Beispiel #1
0
        public void NoExceptionForMethod()
        {
            ICollection <string> errs = pv.ValidateType(typeof(ClassWithInternal));

            Assert.That(errs, Is.Not.Null);
            Assert.That(errs.Count, Is.EqualTo(1));
        }
Beispiel #2
0
        public void NoExceptionForDispose()
        {
            ICollection <string> errs = pv.ValidateType(typeof(CPPMimic));

            Assert.That(errs, Is.Null);
            errs = pv.ValidateType(typeof(Another));
            Assert.That(errs, Is.Null);
            errs = pv.ValidateType(typeof(OneMore));
            Assert.That(errs.Count, Is.EqualTo(1));
        }
Beispiel #3
0
        private void Validate(System.Type type)
        {
            ICollection <string> errors = pv.ValidateType(type);

            if (errors != null)
            {
                throw new InvalidProxyTypeException(errors);
            }
        }