mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
- Refactoring UT to fit concept it's validating.
--HG-- branch : dev
This commit is contained in:
@@ -45,11 +45,13 @@ namespace Orchard.Tests.Commands {
|
||||
var builder = new CommandHandlerDescriptorBuilder();
|
||||
var descriptor = builder.Build(typeof(PublicMethodsOnly));
|
||||
Assert.That(descriptor, Is.Not.Null);
|
||||
Assert.That(descriptor.Commands.Count(), Is.EqualTo(3));
|
||||
Assert.That(descriptor.Commands.Count(), Is.EqualTo(1));
|
||||
Assert.That(descriptor.Commands.Single(d => d.Name == "Method"), Is.Not.Null);
|
||||
}
|
||||
|
||||
#pragma warning disable 660,661
|
||||
public class PublicMethodsOnly {
|
||||
#pragma warning restore 660,661
|
||||
public bool Bar { get; set; } // no accessors
|
||||
public bool Field = true; // no field
|
||||
|
||||
@@ -70,14 +72,6 @@ namespace Orchard.Tests.Commands {
|
||||
return false;
|
||||
}
|
||||
|
||||
public override int GetHashCode() {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public override bool Equals(Object obj) {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void Method() {
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user