예제 #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();
        }
예제 #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();
        }