public void SetterAndGetterTest(string provider) { ConsoleAppBaseMocked mocked = new ConsoleAppBaseMocked(provider); AddAuthenArguments(mocked); mocked.SetNoSqlContext(null); mocked.SetStorageContext(null); mocked.SetLogger(null); mocked.DumpParameter(); var args = mocked.GetArguments(); Assert.AreEqual(5, args.Count, "Argument count should match!!!"); Assert.AreEqual(null, mocked.GetNoSqlContext(), "Returned context must be null!!!"); Assert.AreEqual(null, mocked.GetStorageContext(), "Returned context must be null!!!"); Assert.AreEqual(null, mocked.GetLogger(), "Returned context must be null!!!"); }
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!!!"); }