public async Task OfficeER_TestGetNewOfficeER() { var officeObj = await OfficeER.NewOfficeER(); Assert.NotNull(officeObj); Assert.False(officeObj.IsValid); }
public async Task OfficeER_TestInvalidSaveOfficeER() { var officeObj = await OfficeER.NewOfficeER(); officeObj.Name = String.Empty; OfficeER savedOffice = null; Assert.False(officeObj.IsValid); Assert.Throws <Csla.Rules.ValidationException>(() => savedOffice = officeObj.Save()); }
private async Task <OfficeER> BuildOfficeER() { var officeObj = await OfficeER.NewOfficeER(); officeObj.Term = 1; officeObj.CalendarPeriod = "annual"; officeObj.Name = "office name"; officeObj.ChosenHow = 2; officeObj.Appointer = "members"; officeObj.LastUpdatedBy = "edm"; officeObj.LastUpdatedDate = DateTime.Now; officeObj.Notes = "notes for office"; return(officeObj); }