public void ConstructorArgChecking()
 {
     var typeData = new TypeData(context, new TypeDataCache(context), GetType(), FudgeFieldNameConvention.Identity);
     var surrogate = new SurrogateClass();
     var selector = new SurrogateSelector();
     Assert.Throws<ArgumentNullException>(() => new DotNetSerializationSurrogateSurrogate(null, typeData, surrogate, selector));
     Assert.Throws<ArgumentNullException>(() => new DotNetSerializationSurrogateSurrogate(context, null, surrogate, selector));
     Assert.Throws<ArgumentNullException>(() => new DotNetSerializationSurrogateSurrogate(context, typeData, null, selector));
 }
Exemple #2
0
        public void ConstructorArgChecking()
        {
            var typeData  = new TypeData(context, new TypeDataCache(context), GetType(), FudgeFieldNameConvention.Identity);
            var surrogate = new SurrogateClass();
            var selector  = new SurrogateSelector();

            Assert.Throws <ArgumentNullException>(() => new DotNetSerializationSurrogateSurrogate(null, typeData, surrogate, selector));
            Assert.Throws <ArgumentNullException>(() => new DotNetSerializationSurrogateSurrogate(context, null, surrogate, selector));
            Assert.Throws <ArgumentNullException>(() => new DotNetSerializationSurrogateSurrogate(context, typeData, null, selector));
        }