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)); }
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)); }