public void CanEditTenantsDetails() { var service = new TenantService(new FakeTenantRepository()); var tenant = service.GetTenant("001"); tenant.FullName = "ChangedName"; service.UpdateTenant(tenant); var changedTenant = service.GetTenant("001"); Assert.AreEqual(tenant.FullName, changedTenant.FullName); }
public void CanDeleteTenant() { var service = new TenantService(new FakeTenantRepository()); service.DeleteTenant("001"); var tenant = service.GetTenant("001"); Assert.IsNull(tenant); }
public void CanGetCustomerByAdmissionNumber() { var service = new TenantService(new FakeTenantRepository()); var tenant = service.GetTenant("001"); Assert.IsNotNull(tenant); Assert.AreEqual("001", tenant.AdmissionNumber); }