public async Task ProcessRuleAsyncPass() { var request = CreateRequest(NewItemId); var response = CreateResponse(); var rule = new TodoItemIdRule(); await rule.ProcessAsync(request, response, RuleFactory.CreateEmptyListOfCreateRules()); Assert.AreEqual(RuleStatusType.Passed, rule.Status); Assert.IsTrue(rule.ContinueProcessing); Assert.AreEqual(0, response.Notifications.Count); }
public async Task ProcessRuleAsyncNotProvided() { var request = CreateRequest(ItemId); var response = CreateResponse(); var rule = new TodoItemIdRule(); await rule.ProcessAsync(request, response, RuleFactory.CreateEmptyListOfCreateRules()); Assert.IsInstanceOfType(rule, typeof(BaseRule <CreateTodoItemRequest, Response <TodoItemEntity> >)); Assert.AreEqual(RuleStatusType.Failed, rule.Status); Assert.IsFalse(rule.ContinueProcessing); VerifyNotification.AssertResponseNotifications(CreateExpectedResponse(), response); }