public void FactAttributeGeneratesFactCommand() { MethodInfo method = typeof(FactAttributeTests).GetMethod("DummyFactMethod"); FactAttribute attribute = new FactAttribute(); List<ITestCommand> results = new List<ITestCommand>(attribute.CreateTestCommands(Reflector.Wrap(method))); ITestCommand result = Assert.Single(results); Assert.IsType<FactCommand>(result); }
public void DefaultFactAttributeValues() { FactAttribute attrib = new FactAttribute(); MethodInfo method = typeof(FactAttributeTests).GetMethod("DummyFactMethod"); var commands = new List<ITestCommand>(attrib.CreateTestCommands(Reflector.Wrap(method))); ITestCommand command = Assert.Single(commands); FactCommand factCommand = Assert.IsType<FactCommand>(command); Assert.Equal("FactAttributeTests", factCommand.TypeName); Assert.Equal("DummyFactMethod", factCommand.MethodName); Assert.Equal("FactAttributeTests.DummyFactMethod", factCommand.DisplayName); }