Ejemplo n.º 1
0
        public void SaveQrCodeAsPng(CommandLineApplication app)
        {
            var path = Path.Combine(app.WorkingDirectory, "qrcode.png");

            _qrCodeService.SavePngQRCode(path, Message);
            app.Out.WriteLine("Your awesome QR Code was saved at:");
            app.Out.WriteLine(path);
        }
Ejemplo n.º 2
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();
        }