public void ShouldNotLoadAgainIfInitializedCalledMoreThanOnce() { var catalog = new TestableModuleCatalog(); var testableCatalog = new TestableModuleCatalog(); Assert.IsFalse(testableCatalog.LoadCalled); Assert.IsFalse(testableCatalog.ValidateCalled); testableCatalog.Initialize(); Assert.AreEqual <int>(1, testableCatalog.LoadCalledCount); testableCatalog.Initialize(); Assert.AreEqual <int>(1, testableCatalog.LoadCalledCount); }
public void ShouldLoadAndValidateOnInitialize() { var catalog = new TestableModuleCatalog(); var testableCatalog = new TestableModuleCatalog(); Assert.IsFalse(testableCatalog.LoadCalled); Assert.IsFalse(testableCatalog.ValidateCalled); testableCatalog.Initialize(); Assert.IsTrue(testableCatalog.LoadCalled); Assert.IsTrue(testableCatalog.ValidateCalled); Assert.IsTrue(testableCatalog.LoadCalledFirst); }
public void ShouldNotLoadAgainDuringInitialize() { var catalog = new TestableModuleCatalog(); var testableCatalog = new TestableModuleCatalog(); Assert.False(testableCatalog.LoadCalled); Assert.False(testableCatalog.ValidateCalled); testableCatalog.Load(); Assert.Equal <int>(1, testableCatalog.LoadCalledCount); testableCatalog.Initialize(); Assert.Equal <int>(1, testableCatalog.LoadCalledCount); }
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); }