public void Invalid_Value_Returns_False(object input) { // Arrange var handler = new BooleanTypeHandler(); // Act var result = handler.Parse(input); // Assert Assert.False(result); }
/// <summary> /// Adds instances of type handlers to the internal cache. /// </summary> static TypeHandlerFactory() { CACHE[typeof(Boolean)] = new BooleanTypeHandler(); CACHE[typeof(Char)] = new CharTypeHandler(); CACHE[typeof(DateTime)] = new DateTimeTypeHandler(); CACHE[typeof(Decimal)] = new DecimalTypeHandler(); CACHE[typeof(Double)] = new DoubleTypeHandler(); CACHE[typeof(float)] = new FloatTypeHandler(); CACHE[typeof(int)] = new IntegerTypeHandler(); CACHE[typeof(long)] = new LongTypeHandler(); CACHE[typeof(short)] = new ShortTypeHandler(); }
public void BoolConverterTest02() { const string val = "1"; Assert.AreEqual(true, BooleanTypeHandler.Convert(DataItemUtilities.ProcessPattern(val, null))); }