예제 #1
0
        public void InitializeInstance_CalledTwice_ThrowsException()
        {
            var stumpsContext = new StumpsHttpContext();

            Assert.ThrowsAsync <ArgumentNullException>(async() => await stumpsContext.InitializeInstance(null));
            Assert.ThrowsAsync <InvalidOperationException>(async() => await stumpsContext.InitializeInstance(null));
        }
예제 #2
0
        public void InitializeInstance_WithNullContext_ThrowsException()
        {
            var stumpsContext = new StumpsHttpContext();

            var ex = Assert.ThrowsAsync <ArgumentNullException>(async() => await stumpsContext.InitializeInstance(null));

            Assert.That(ex.ParamName.Equals("context", StringComparison.Ordinal));
        }