コード例 #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));
        }