public void TestWoopsaConverters()
        {
            var converters = new WoopsaConverters();

            converters.RegisterConverter(typeof(decimal), WoopsaConverterDecimal.Converter, WoopsaValueType.Real);
            var resut = converters.InferWoopsaType(typeof(decimal), out var valueType, out var converter);

            Assert.IsTrue(resut);
            Assert.IsNotNull(converter);
            Assert.AreEqual(WoopsaValueType.Real, valueType);
            Assert.AreEqual(typeof(WoopsaConverterDecimal), converter.GetType());
        }
Exemplo n.º 2
0
 public TypeDescriptions(WoopsaConverters customValueTypeConverters)
 {
     _typeDescriptions    = new Dictionary <Type, TypeDescription>();
     CustomTypeConverters = customValueTypeConverters;
 }