コード例 #1
0
        public void ShouldCauseTheLoadMethodToBeCalledIfTheComponentIsNotAlreadyLoaded()
        {
            LoadsOk ok = new LoadsOk(true);

            ok.Load();

            Assert.True(ok.WasLoadCalled());
        }
コード例 #2
0
        public void ShouldThrowAnErrorIfCallingLoadDoesNotCauseTheComponentToLoad()
        {
            LoadsOk ok = new LoadsOk(false);

            try
            {
                ok.Load();
                Assert.Fail();
            }
            catch (LoadableComponentException e)
            {
                Assert.AreEqual("Expected failure", e.Message);
            }
        }