Пример #1
0
        public void ExpectGetPrintFrameOfPrintDecoratorNotToBeEmptyString()
        {
            var matrix = new MatrixFactory().CreateMatrix(MatrixTypes.BIG);

            var player = new Player();

            var printer = new PrinterLightMode();
            var standartPrinter = new StandardPrinter();
            printer.SetPrinter(standartPrinter);

            var result = printer.GetPrintFrame(matrix, player);

            Assert.AreNotEqual(result.Length, 0);
        }
Пример #2
0
        public void ExpectGetPrintFrameToReturntNotEmptyString()
        {
            var director = new MatrixDirector();
            var builder = new SmallMatrixBuilder();
            director.Construct(builder);
            var matrix = builder.GetMatrix();

            var player = new Player();

            var printer = new StandardPrinter();

            var result = printer.GetPrintFrame(matrix, player);

            Assert.AreNotEqual(result.Length, 0);
        }
Пример #3
0
        public void ExpectPrintLineOfPrinterDecoratorNotToThrow()
        {
            var lightPrinter = new PrinterLightMode();
            var standartPrinter = new StandardPrinter();

            lightPrinter.SetPrinter(standartPrinter);
            var message = "test message";

            Assert.DoesNotThrow(() => lightPrinter.PrintLine(message));
        }
Пример #4
0
        public void ExpectPrintMatrixNotToThrow()
        {
            var matrix = new MatrixFactory().CreateMatrix(MatrixTypes.BIG);
            var player = new Player();

            var printer = new StandardPrinter();

            Assert.DoesNotThrow(() => printer.PrintMatrix(matrix, player));
        }
Пример #5
0
        public void ExpectPrintLineNotToThrow()
        {
            var printer = new StandardPrinter();
            var message = "testMessage";

            Assert.DoesNotThrow(() => printer.PrintLine(message));
        }