Ejemplo n.º 1
0
            public void RemovesTypeRangeUntilSpecificType()
            {
                var path = new TypeRequestPath(new TypeRequestInfo(typeof(X)));

                path.PushType(new TypeRequestInfo(typeof(object)), false);
                path.PushType(new TypeRequestInfo(typeof(Y)), false);
                path.PushType(new TypeRequestInfo(typeof(object)), false);
                path.PushType(new TypeRequestInfo(typeof(Z)), false);

                path.MarkTypeAsNotCreated(new TypeRequestInfo(typeof(Y)));

                Assert.AreEqual(2, path.TypeCount);
                Assert.AreEqual(new TypeRequestInfo(typeof(X)), path.AllTypes[0]);
                Assert.AreEqual(new TypeRequestInfo(typeof(object)), path.AllTypes[1]);
            }
Ejemplo n.º 2
0
            public void ThrowsArgumentNullExceptionForNullTypeRequestInfo()
            {
                var typeArray = CreateMixedArray();
                var path      = new TypeRequestPath(typeArray);

                ExceptionTester.CallMethodAndExpectException <ArgumentNullException>(() => path.MarkTypeAsNotCreated(null));
            }