Exemplo n.º 1
0
        public void WillNotLaunchMissileSpyWithExpiredLaunchCode()
        {
            var missileSpy            = new MissileSpy();
            var expiredLaunchCodeStub = new ExpiredLaunchCodeStub();
            var launchMissile         = new LaunchMissile(missileSpy, expiredLaunchCodeStub, new DummyUsedLaunchCodes());

            launchMissile.Execute();
            missileSpy.LaunchHasBeenCalled().Should().BeFalse();
        }
Exemplo n.º 2
0
        public void WillNotLaunchMissileMockWithExpiredLaunchCode()
        {
            var missileMock          = new MissileMock();
            var expiredLauchCodeStub = new ExpiredLaunchCodeStub();
            var launchMissile        = new LaunchMissile(missileMock, expiredLauchCodeStub, new DummyUsedLaunchCodes());

            launchMissile.Execute();
            missileMock.VerifyCodeRedAbort();
        }
Exemplo n.º 3
0
        public void WillNotLaunchMissileWithExpiredLaunchCodeStub()
        {
            var dummyMissile          = new DummyMissile();
            var expiredLaunchCodeStub = new ExpiredLaunchCodeStub();
            var launchMissile         = new LaunchMissile(dummyMissile, expiredLaunchCodeStub, new DummyUsedLaunchCodes());

            launchMissile.Execute();
            dummyMissile.Should().NotBeEquivalentTo(new NotImplementedException());
        }