Example #1
0
        public void ShouldAllowLoadToBeInvokedTwice()
        {
            var catalog = new TestableModuleCatalog();

            var testableCatalog = new TestableModuleCatalog();

            testableCatalog.Load();
            Assert.AreEqual <int>(1, testableCatalog.LoadCalledCount);
            testableCatalog.Load();
            Assert.AreEqual <int>(2, testableCatalog.LoadCalledCount);
        }
Example #2
0
        public void ShouldNotLoadAgainDuringInitialize()
        {
            var catalog = new TestableModuleCatalog();

            var testableCatalog = new TestableModuleCatalog();

            Assert.IsFalse(testableCatalog.LoadCalled);
            Assert.IsFalse(testableCatalog.ValidateCalled);

            testableCatalog.Load();
            Assert.AreEqual <int>(1, testableCatalog.LoadCalledCount);
            testableCatalog.Initialize();
            Assert.AreEqual <int>(1, testableCatalog.LoadCalledCount);
        }
Example #3
0
        public void ShouldAllowLoadToBeInvokedTwice()
        {
            var catalog = new TestableModuleCatalog();

            var testableCatalog = new TestableModuleCatalog();
            testableCatalog.Load();
            Assert.AreEqual<int>(1, testableCatalog.LoadCalledCount);
            testableCatalog.Load();
            Assert.AreEqual<int>(2, testableCatalog.LoadCalledCount);
        }
Example #4
0
        public void ShouldNotLoadAgainDuringInitialize()
        {
            var catalog = new TestableModuleCatalog();

            var testableCatalog = new TestableModuleCatalog();
            Assert.IsFalse(testableCatalog.LoadCalled);
            Assert.IsFalse(testableCatalog.ValidateCalled);

            testableCatalog.Load();
            Assert.AreEqual<int>(1, testableCatalog.LoadCalledCount);
            testableCatalog.Initialize();
            Assert.AreEqual<int>(1, testableCatalog.LoadCalledCount);
        }