public void Formatters_Ctor_Assigns_Formatters_During_Construction() { var resolver = new TypeFormatterResolver(new DateTime_Iso8601_Formatter()); var formatter = resolver.Find <DateTime>(); Assert.IsInstanceOfType(formatter, typeof(DateTime_Iso8601_Formatter)); }
public void Find_Returns_Assigned_Generic_TypeFormatterResolver() { var resolver = new TypeFormatterResolver(new DateTime_Iso8601_Formatter()); var formatter = resolver.Find <DateTime>(); Assert.IsInstanceOfType(formatter, typeof(DateTime_Iso8601_Formatter)); }
public void Find_Returns_Null_If_Formatter_Assigned_To_Different_Type() { var resolver = new TypeFormatterResolver(new DateTimeOffset_Iso8601_Formatter()); var formatter = resolver.Find <DateTime>(); Assert.IsNull(formatter); }
public void Find_Returns_Null_If_No_Formatter_Assigned() { var resolver = new TypeFormatterResolver(); var formatter = resolver.Find <DateTime>(); Assert.IsNull(formatter); }