Beispiel #1
0
        public void RemoveMaskedEmailCommand_FormatCommandLine()
        {
            var command      = new RemoveMaskedEmailCommand("*****@*****.**");
            var commandLines = MaskedEmailCommandLineFormatter.Format(command);

            Assert.AreEqual(1, commandLines.Length);
            Assert.AreEqual("/usr/local/bin/remove-masked-email -address [email protected] -force", commandLines[0]);
        }
 public static async Task RemoveMaskedEmailAsync(this IMaskedEmailCommandService service
                                                 , string address)
 {
     var addCommand = new RemoveMaskedEmailCommand
     {
         Address = address,
     };
     await service.QueueCommandAsync(addCommand);
 }
        public void RemoveMaskedEmailCommand_DeserializeObject()
        {
            var command = new RemoveMaskedEmailCommand("*****@*****.**");

            var text = MaskedEmailCommandJsonConvert.SerializeObject(command);

            var o = MaskedEmailCommandJsonConvert.DeserializeObject(text);

            Assert.AreEqual(command.Action, o.Action);
            Assert.AreEqual(command.Address, o.Address);

            var c = o as RemoveMaskedEmailCommand;

            Assert.NotNull(c);
        }