Exemplo n.º 1
0
        public void SolveFirstPuzzle_WhenUsingSimpleMode()
        {
            var sut = Submarine.CreateSimpleSubmarineFor(REAL_COURSE);

            Assert.Equal(1692075, sut.Multiplier);
        }
Exemplo n.º 2
0
        public void SolveFirstSample_WhenUsingSimpleMode()
        {
            var sut = Submarine.CreateSimpleSubmarineFor(SAMPLE_COURSE);

            Assert.Equal(150, sut.Multiplier);
        }
Exemplo n.º 3
0
        public void BeInitializedCorrectly_WhenUsingSimpleMode()
        {
            var sut = Submarine.CreateSimpleSubmarineFor("up 0");

            Assert.Equal(0, sut.Multiplier);
        }
Exemplo n.º 4
0
        public void CalculateDepthCorrectly_WhenUsingSimpleMode(string course, int expectedMultiplier)
        {
            var sut = Submarine.CreateSimpleSubmarineFor(course);

            Assert.Equal(expectedMultiplier, sut.Multiplier);
        }
Exemplo n.º 5
0
        public void ThrowException_WhenCourseIsInvalid(string invalidCourse)
        {
            var exception = Assert.Throws <ArgumentException>(() => Submarine.CreateSimpleSubmarineFor(invalidCourse));

            Assert.Equal("Invalid course", exception.Message);
        }