コード例 #1
0
        public void Build_Language_Correct(LanguageType language, ColumnType columnType)
        {
            var info = Mock.Of <ITransformationInfo>
                       (
                i => i.Language == language &&
                i.OriginalType == columnType &&
                i.Code == "value"
                       );
            var factory = new TransformerFactory();

            Assert.Throws <InvalidOperationException>(delegate { factory.Build(info); });
        }
コード例 #2
0
        public void Build_Language_Correct(ColumnType originalType, Type result)
        {
            var info = Mock.Of <ITransformationInfo>
                       (
                i => i.Language == LanguageType.CSharp &&
                i.OriginalType == originalType &&
                i.Code == "value"
                       );
            var factory  = new TransformerFactory();
            var provider = factory.Build(info);

            Assert.IsInstanceOf(result, provider);
        }