public async void OrganizationTypeER_Get() { var organizationType = await OrganizationTypeER.GetOrganizationTypeER(1); Assert.NotNull(organizationType); Assert.Equal(1, organizationType.Id); Assert.True(organizationType.IsValid); }
public async Task OrganizationTypeER_DeleteObjectFromDatabase() { const int ID_TO_DELETE = 99; await OrganizationTypeER.DeleteOrganizationTypeER(ID_TO_DELETE); var categoryToCheck = await Assert.ThrowsAsync <Csla.DataPortalException> (() => OrganizationTypeER.GetOrganizationTypeER(ID_TO_DELETE)); }
public async void OrganizationTypeER_UpdateExistingObjectInDatabase() { var updatedName = "new name"; var organizationType = await OrganizationTypeER.GetOrganizationTypeER(1); organizationType.Name = updatedName; var result = await organizationType.SaveAsync(); Assert.NotNull(result); Assert.Equal(updatedName, result.Name); }