예제 #1
0
        public void GetKnownNoSqlContextWithAuthenTest(string provider)
        {
            ConsoleAppBaseMocked mocked = new ConsoleAppBaseMocked(provider);

            AddAuthenArguments(mocked);

            var ctx1 = mocked.GetNoSqlContextWithAuthen(provider);
            var ctx2 = mocked.GetNoSqlContext();

            Assert.AreNotEqual(null, ctx1, "Returned context must not be null!!!");
            Assert.AreEqual(null, ctx2, "Returned context must be null!!!");
        }
예제 #2
0
        public void GetUnknownNoSqlContextWithAuthenTest(string provider)
        {
            ConsoleAppBaseMocked mocked = new ConsoleAppBaseMocked(provider);

            AddAuthenArguments(mocked);

            try
            {
                var ctx1 = mocked.GetNoSqlContextWithAuthen(provider);
                Assert.Fail("Exception should be thrown here!!!");
            }
            catch
            {
            }

            var ctx2 = mocked.GetNoSqlContext();
            var ctx3 = mocked.GetStorageContext();

            Assert.AreEqual(null, ctx2, "Returned context must be null!!!");
            Assert.AreEqual(null, ctx3, "Returned context must be null!!!");
        }