Exemple #1
0
        public void Should_Update_With_Error_And_Success()
        {
            JsonPatchDocument <TenantUpdateModel> patch = new JsonPatchDocument <TenantUpdateModel>();

            patch.Replace(t => t.TenantEmails, "*****@*****.**");
            patch.Replace(t => t.TenantName, "Hi there");
            patch.Replace(t => t.TenantPhones, "464645654");
            patch.Replace(t => t.ParentTenantId, Guid.NewGuid());

            JsonPatchDocument <TenantUpdateModel> patch1 = new JsonPatchDocument <TenantUpdateModel>();

            patch1.Replace(t => t.TenantEmails, "*****@*****.**");
            patch1.Replace(t => t.TenantName, "Hi there");
            patch1.Replace(t => t.TenantPhones, "464645654");
            patch1.Replace(t => t.ParentTenantId, Guid.NewGuid());

            ActionResult result1 = tenantsController.Update(new Guid("C5E35258-5BAD-44B5-B1BC-ED25A6C9E27A"), patch1);

            Assert.That(result1, Is.TypeOf <NoContentResult>());
        }