public void Trims_String_Values() { HomogenizerTester.HomogenizesValuesOfSupportedType( new IgnoreLeadingAndTrailingWhitespaceHomogenizer(), new[] { " Hello ", "Hello" }, new[] { "\r\nout there", "out there" }, new[] { "we're on\t", "we're on" }, new[] { "the aiR", "the aiR" }, new[] { "\t\t it's hockey\t\r\n ", "it's hockey" }, new[] { " night Tonight\r\n", "night Tonight" }); }
public void Converts_Strings_To_Upper_Case() { HomogenizerTester.HomogenizesValuesOfSupportedType( new CaseInsensitiveComparisonHomogenizer(), new[] { "One", "ONE" }, new[] { " twO ", " TWO " }, new[] { " three ", " THREE " }, new[] { "four ", "FOUR " }, new[] { " FIVE", " FIVE" }, new[] { string.Empty, string.Empty }, new[] { " ", " " }, new[] { (string)null, null }); }
public void Trims_Time_Portion_Of_DateTime_Values() { HomogenizerTester.HomogenizesValuesOfSupportedType( new IgnoreDateTimeTimeHomogenizer(), new[] { new DateTime(2002, 3, 28, 10, 24, 22), new DateTime(2002, 3, 28) }, new[] { DateTime.Now, DateTime.Today }, new[] { new DateTime(2016, 12, 27, 12, 18, 5), new DateTime(2016, 12, 27) }); }
public void Trims_Time_Portion_Of_DateTimeOffset_Values() { HomogenizerTester.HomogenizesValuesOfSupportedType( new IgnoreDateTimeOffsetTimeHomogenizer(), homogenizedValue => homogenizedValue.DateTime, new[] { new DateTimeOffset(1969, 7, 20, 14, 17, 40, TimeSpan.FromHours(-6)), new DateTime(1969, 7, 20) }, new[] { DateTimeOffset.Now, DateTime.Today }, new[] { new DateTimeOffset(1961, 4, 12, 12, 7, 7, TimeSpan.FromHours(6)), new DateTime(1961, 4, 12) }, new[] { new DateTimeOffset(1972, 12, 11, 2, 55, 0, TimeSpan.FromHours(-5)), new DateTime(1972, 12, 11) }); }
public void Does_Not_Affect_Non_DateTime_Values() { HomogenizerTester.DoesNotAffectValuesOfUnsupportedTypes < IgnoreDateTimeTimeHomogenizer, DateTime>(); }
public void Does_Not_Affect_Non_String_Values() { HomogenizerTester.DoesNotAffectValuesOfUnsupportedTypes < CaseInsensitiveComparisonHomogenizer, string>(); }
public void Does_Not_Affect_Non_String_Values() { HomogenizerTester.DoesNotAffectValuesOfUnsupportedTypes < IgnoreLeadingAndTrailingWhitespaceHomogenizer, string>(); }