Exemple #1
0
        public async Task OfficeER_TestGetNewOfficeER()
        {
            var officeObj = await OfficeER.NewOfficeER();

            Assert.NotNull(officeObj);
            Assert.False(officeObj.IsValid);
        }
Exemple #2
0
        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());
        }
Exemple #3
0
        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);
        }