public void Does_not_throw_an_exception_when_the_table_is_empty_and_the_set_is_empty() { var table = new Table("StringProperty"); var items = new SetComparisonTestObject[] {}; var comparisonResult = DetermineIfExceptionWasThrownByComparingThese(table, items); comparisonResult.ExceptionWasThrown.ShouldBeFalse(comparisonResult.ExceptionMessage); }
public void Throws_an_exception_when_there_is_one_row_but_the_set_is_empty() { var table = new Table("StringProperty"); table.AddRow("this is not an empty table"); var items = new SetComparisonTestObject[] {}; var comparisonResult = DetermineIfExceptionWasThrownByComparingThese(table, items); comparisonResult.ExceptionWasThrown.Should().BeTrue(comparisonResult.ExceptionMessage); }
public void Returns_a_descriptive_error_when_no_results_exist_when_one_expected() { var table = new Table("StringProperty"); table.AddRow("orange"); var items = new SetComparisonTestObject[] { }; var exception = GetTheExceptionThrowByComparingThese(table, items); exception.Message.AgnosticLineBreak().Should().Be(@" | StringProperty | - | orange | ".AgnosticLineBreak()); }
public void SetUp() { Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US"); testInstance = new SetComparisonTestObject { DateTimeProperty = DateTime.Today, GuidProperty = testGuid1, IntProperty = 1, StringProperty = "a" }; testCollection = new[] { testInstance, new SetComparisonTestObject { DateTimeProperty = DateTime.Today, GuidProperty = testGuid2, IntProperty = 2, StringProperty = "b" }, }; }