Beispiel #1
0
        public void TypeConverter_IsPassedConf()
        {
            var converter = new TypeConverterHelper.MyConfTypeConverter();

            Subject.TypeConverter[typeof(TypeConverterHelper.ConvertedType)] = converter;
            Subject.Content = "helper.property = _";
            Subject.Configure(new TypeConverterHelper.ConfiguredType(), "helper");
            Assert.AreSame(Subject.Block, converter.Param);
        }
Beispiel #2
0
        public void Log_SetsLogAction()
        {
            var converter = new TypeConverterHelper.MyConfTypeConverter();
            var log       = "";

            Subject.Log = s => log += s;
            Subject.TypeConverter[typeof(TypeConverterHelper.ConvertedType)] = converter;
            Subject.Content = "helper.property = _";
            Subject.Configure(new TypeConverterHelper.ConfiguredType(), "helper");
            Assert.That(log, Is.Not.Empty);
        }