Example #1
0
        public async Task AddCommandAsyncTest()
        {
            var sut         = new ComandService();
            var testCommand = new CountCommand();

            testCommand.Action = () => { return(true); };
            var result = await sut.AddCommandAsync(testCommand);

            Assert.IsTrue(result);
        }
Example #2
0
        public async Task AddCommandAsyncTest()
        {
            using (var loggerFactory = LoggerFactory.Create(builder => builder.AddConsole()))
            {
                var logger      = loggerFactory.CreateLogger <ComandServiceTests>();
                var sut         = new ComandService(logger);
                var testCommand = new CountCommand();
                testCommand.Action = () => { return(true); };
                var result = await sut.AddCommandAsync(testCommand);

                Assert.IsTrue(result);
            }
        }