public void get_the_argument_cells_for_a_method_that_has_a_non_primitive() { Cell[] cells = ReflectionHelper.GetMethod <MethodTarget>(x => x.ContextualMethodThatReturns(null, null, 0)) .GetArgumentCells(); var expected = new[] { new Cell("name", typeof(string)), new Cell("age", typeof(int)), }; TestUtility.AssertListMatches(new List <Cell>(cells), expected); }
public void get_cells_has_a_cell_for_each_property() { List<Cell> actual = comparer.Columns.Select(x => x.Cell).ToList(); var expected = new List<Cell> { Cell.For<string>("City"), Cell.For<string>("Address1"), Cell.For<double>("DistanceFromOffice") }; TestUtility.AssertListMatches(actual, expected); }
public void get_the_cells() { FactAssertion assertion = FactAssertion.Create(x => x.MethodWithArgs(null, 0), new AssertionFixture()); IList <Cell> actual = assertion.GetCells(); var expected = new List <Cell> { Cell.For <string>("name"), Cell.For <int>("age"), Cell.For <bool>("returnValue") }; TestUtility.AssertListMatches((IList)actual, expected); }
public void load_files_from_directory() { var runner = new DirectoryRunner(null, new TestReader(), null, new FileSystem(), new DirectoryRunnerSetup { TestFolder = @"..\..\SampleData" }); List <Test> tests = runner.LoadAllTests(); var expected = new List <Test> { new Test("h") { SuiteName = "Address" }, new Test("a") { SuiteName = "Address\\Data" }, new Test("b") { SuiteName = "Address\\Data" }, new Test("c") { SuiteName = "Address\\Screen" }, new Test("d") { SuiteName = "Address\\Screen" }, new Test("e") { SuiteName = "Console" }, new Test("f") { SuiteName = "Console" }, new Test("g") { SuiteName = "Console" }, }; TestUtility.AssertListMatches(tests, expected); }