Exemplo n.º 1
0
        public void DrawMap_WHEN_InvokedWithNull_THEN_ThrowArgumentNullException()
        {
            IDrawService drawService = new DrawService();
            var          action      = new Func <string>(() => drawService.DrawMap(null));

            action.Should().ThrowExactly <ArgumentNullException>();
        }
Exemplo n.º 2
0
        public void DrawMap_WHEN_InvokedWithMapWithoutShoots_THEN_ReturnMapConvertedToStringWithProperChars()
        {
            IDrawService drawService = new DrawService();
            var          map         = new Map(10, 10);
            var          textMap     = drawService.DrawMap(map);

            textMap.Length.Should().BePositive();
            textMap.Should().NotContain("x");
            textMap.Should().NotContain("o");
            textMap.Should().Contain("+");
        }