public void Parse_existing_verb_returns_verb_instance() { // Fixture setup var expected = new Add_Verb { Patch = true, FileName = "dummy.bin" }; // Exercize system var result = InvokeChoose( new[] { typeof(Add_Verb), typeof(Commit_Verb), typeof(Clone_Verb) }, new[] { "add", "--patch", "dummy.bin" }); // Verify outcome Assert.IsType <Add_Verb>(((Parsed <object>)result).Value); expected.ShouldBeEquivalentTo(((Parsed <object>)result).Value); // Teardown }
public void Parse_existing_verb_returns_verb_instance() { // Fixture setup var expected = new Add_Verb { Patch = true, FileName = "dummy.bin" }; // Exercize system var result = InstanceChooser.Choose( new[] { typeof(Add_Verb), typeof(Commit_Verb), typeof(Clone_Verb) }, new[] { "add", "--patch", "dummy.bin" }, StringComparer.Ordinal, CultureInfo.InvariantCulture, Enumerable.Empty <ErrorType>()); // Verify outcome Assert.IsType <Add_Verb>(((Parsed <object>)result).Value); expected.ShouldBeEquivalentTo(((Parsed <object>)result).Value); // Teardown }