public void Has80PercentChanceOfNotFixingAnEngine()
        {
            var randomMock = new Mock <IRandom>();

            randomMock.Setup(r => r.GetNumber()).Returns(79);

            var engineMock = new Mock <IEngine>();

            var sut = new CheapEngineFixer(randomMock.Object);

            sut.FixEngine(engineMock.Object);
            engineMock.Verify(e => e.Fix(), Times.Never);
        }
        public void Has80PercentChanceOfNotFixingAnEngine()
        {
            var fixerRandomMock = new Mock <IRandom>();

            fixerRandomMock.Setup(r => r.GetNumber()).Returns(79);

            var engineRandomMock = new Mock <IRandom>();

            engineRandomMock.Setup(r => r.GetNumber()).Returns(90);

            var engine = new Engine(engineRandomMock.Object);

            Assert.That(engine.HasProblem(), Is.True);

            var sut = new CheapEngineFixer(fixerRandomMock.Object);

            sut.FixEngine(engine);
            Assert.That(engine.HasProblem(), Is.True);
        }