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 SetTestObject[] {};

            var exceptionWasThrown = DetermineIfExceptionWasThrownByComparingThese(table, items);

            exceptionWasThrown.ShouldBeFalse();
        }
        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 SetTestObject[] {};

            var exceptionWasThrown = DetermineIfExceptionWasThrownByComparingThese(table, items);

            exceptionWasThrown.ShouldBeTrue();
        }
 private static bool DetermineIfExceptionWasThrownByComparingThese(Table table, SetTestObject[] items)
 {
     var exceptionWasThrown = false;
     try
     {
         table.CompareToSet(items);
     }
     catch (ComparisonException ex)
     {
         exceptionWasThrown = true;
     }
     return exceptionWasThrown;
 }
 private static ComparisonException GetTheExceptionThrowByComparingThese(Table table, SetTestObject[] items)
 {
     try
     {
         table.CompareToSet(items);
     }
     catch (ComparisonException ex)
     {
         return ex;
     }
     return null;
 }