Пример #1
0
        public void LayerStack_BadCtorArguments_Throw()
        {
            var testLayer1 = new TestLayer_AlwaysThrows();

            Assert.Throws <ArgumentException>(() => new LayerStack <Dummy>(null));
            Assert.Throws <ArgumentNullException>(() => new LayerStack <Dummy>(null, null));
            Assert.Throws <ArgumentNullException>(() => new LayerStack <Dummy>(testLayer1, null));
        }
Пример #2
0
        public void LayerStack_BadCtorArguments_Throw()
        {
            var testLayer1 = new TestLayer_AlwaysThrows();

            Assert.Throws <ArgumentException>(() => new LayerStack <Dummy>(LoggerTests.BlackHole, null));
            Assert.Throws <ArgumentException>(() => new LayerStack <Dummy>(LoggerTests.BlackHole, new ILayer <Dummy> [0]));
            Assert.Throws <ArgumentNullException>(() => new LayerStack <Dummy>(LoggerTests.BlackHole, null, null));
            Assert.Throws <ArgumentNullException>(() => new LayerStack <Dummy>(LoggerTests.BlackHole, testLayer1, null));
        }