Example #1
0
        public void CreateCommandShouldSaveQRCodePNG()
        {
            var createCommand = new CreateCommand(qrCodeService);

            createCommand.Message    = "message";
            createCommand.OutputType = OutputType.PNG;

            createCommand.OnExecute(commandLineApplication);

            A.CallTo(() => qrCodeService.SavePngQRCode(A <string> .Ignored, createCommand.Message))
            .MustHaveHappened();
        }
Example #2
0
        public void CreateCommandShouldWriteQRCodeOnCli()
        {
            var createCommand = new CreateCommand(qrCodeService);

            createCommand.Message    = "message";
            createCommand.OutputType = OutputType.CLI;

            createCommand.OnExecute(commandLineApplication);

            A.CallTo(() => qrCodeService.GetAsciiQRCode(createCommand.Message))
            .MustHaveHappened();
        }