Exemplo n.º 1
0
        public async Task OnInitializationAsync_Is_Invoked()
        {
            var mock = new MockCommand();
            await mock.ExecuteAsync();

            mock.OnInitializationAsyncWasInvoked.ShouldBe(true);
        }
Exemplo n.º 2
0
        public async Task OnExecuteAsync_Is_Invoked_When_No_Errors_Exist()
        {
            var mock = new MockCommand();
            await mock.ExecuteAsync();

            mock.OnExecuteAsyncWasInvoked.ShouldBe(true);
        }
Exemplo n.º 3
0
        public async Task OnExecuteAsyncIsInvokedWhenNoErrorsExist()
        {
            var mock = new MockCommand();
            await mock.ExecuteAsync();

            mock.OnExecuteAsyncWasInvoked.ShouldBe(true);
        }
Exemplo n.º 4
0
        public async Task OnExecuteAsync_Is_Not_Invoked_When_Errors_Exist()
        {
            var mock = new MockCommand {
                Errors = new[] { new ValidationResult("Object doesn't exist") }
            };
            await mock.ExecuteAsync();

            mock.OnExecuteAsyncWasInvoked.ShouldBe(false);
        }
Exemplo n.º 5
0
        public async Task OnExecuteAsyncIsNotInvokedWhenErrorsExist()
        {
            var mock = new MockCommand();

            mock.Errors = new[] { new ValidationResult("Object doesn't exist") };
            await mock.ExecuteAsync();

            mock.OnExecuteAsyncWasInvoked.ShouldBe(false);
        }
Exemplo n.º 6
0
 public async Task OnExecuteAsyncIsNotInvokedWhenErrorsExist()
 {
     var mock = new MockCommand();
     mock.Errors = new[] { new ValidationResult("Object doesn't exist") };
     await mock.ExecuteAsync();
     mock.OnExecuteAsyncWasInvoked.ShouldBe(false);
 }
Exemplo n.º 7
0
  public async Task OnExecuteAsyncIsInvokedWhenNoErrorsExist()
  {
      var mock = new MockCommand();
      await mock.ExecuteAsync();
      mock.OnExecuteAsyncWasInvoked.ShouldBe(true);
 } 
Exemplo n.º 8
0
 public async Task OnInitializationAsyncIsInvoked()
 {
     var mock = new MockCommand();
     await mock.ExecuteAsync();
     mock.OnInitializationAsyncWasInvoked.ShouldBe(true);
 }