Ejemplo 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();
        }
Ejemplo 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();
        }
Ejemplo 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());
        }
Ejemplo n.º 4
0
        public void WillNotLaunchMissileMockWithUsedLaunchCode()
        {
            var missileMock     = new MissileMock();
            var validLaunchCode = new ValidLaunchCode();
            var fakeLaunchCodes = new FakeLaunchCodes();

            fakeLaunchCodes.add(validLaunchCode);
            var launchMissile = new LaunchMissile(missileMock, validLaunchCode, fakeLaunchCodes);

            launchMissile.Execute();
            missileMock.VerifyCodeRedAbort();
        }