Beispiel #1
0
        internal IDepartmentModel Create(IDataStore dataStore, IApplicationSettings applicationSettings, IApplication application
                                         , DummyDataManager dtm, Random random)
        {
            DepartmentManager manager = new DepartmentManager(dataStore);

            IDepartmentModel department = new DepartmentModel(
                application.ApplicationId
                , "DepartmentName" + random.Next(1000000, 10000000));

            PopulateWithRandomValues(department, dtm, random);

            BusinessObjectActionReport <DataRepositoryActionStatus> report = manager.Create(application.ApplicationId, department);

            Assert.AreEqual(DataRepositoryActionStatus.Success, report.Status);

            IDepartmentModel dsDepartmentModel = manager.GetDepartment(department.ApplicationId, department.DepartmentId);

            Assert.IsNotNull(dsDepartmentModel);

            return(dsDepartmentModel);
        }