public static void ClassInit(TestContext context) { _envUtil = new EnvUtil(Settings.PwaUri); _mapper = new FluentMapper(new PsMappingConfiguration()); _projectService = PsiContext.Get <IProject>(Settings.PwaUri); _customFieldsService = PsiContext.Get <ICustomFields>(Settings.PwaUri); ClassCleanup(); var cfs = new List <BasicProjectCustomField> { new BasicProjectCustomField { MdPropUid = Guid.NewGuid(), MdPropName = "Test - Project - Text", MdEntTypeUid = PsEntityType.Project.GetAttr <GuidAttribute>().Guid, MdPropTypeEnum = PsDataType.String }, new BasicProjectCustomField { MdPropUid = Guid.NewGuid(), MdPropName = "Test - Project - Number", MdEntTypeUid = PsEntityType.Project.GetAttr <GuidAttribute>().Guid, MdPropTypeEnum = PsDataType.Number }, new BasicProjectCustomField { MdPropUid = Guid.NewGuid(), MdPropName = "Test - Project - Cost", MdEntTypeUid = PsEntityType.Project.GetAttr <GuidAttribute>().Guid, MdPropTypeEnum = PsDataType.Cost }, new BasicProjectCustomField { MdPropUid = Guid.NewGuid(), MdPropName = "Test - Project - Duration", MdEntTypeUid = PsEntityType.Project.GetAttr <GuidAttribute>().Guid, MdPropTypeEnum = PsDataType.Duration }, new BasicProjectCustomField { MdPropUid = Guid.NewGuid(), MdPropName = "Test - Project - Date", MdEntTypeUid = PsEntityType.Project.GetAttr <GuidAttribute>().Guid, MdPropTypeEnum = PsDataType.Date }, new BasicProjectCustomField { MdPropUid = Guid.NewGuid(), MdPropName = "Test - Project - YesNo - True", MdEntTypeUid = PsEntityType.Project.GetAttr <GuidAttribute>().Guid, MdPropTypeEnum = PsDataType.YesNo }, new BasicProjectCustomField { MdPropUid = Guid.NewGuid(), MdPropName = "Test - Project - YesNo - False", MdEntTypeUid = PsEntityType.Project.GetAttr <GuidAttribute>().Guid, MdPropTypeEnum = PsDataType.YesNo } }; _envUtil.CreateCustomFields(cfs); var simpleProject = new BasicProject { ProjUid = Settings.DefaultProjectGuid, ProjName = Settings.DefaultProjectName, ProjType = (int)ProjectType.Project, WprojDescription = Settings.DefaultProjectName, TestProjectText = "10", TestProjectNumber = 20, TestProjectCost = 3000, TestProjectDuration = 4000, TestProjectDate = DateTime.Parse("1991-02-16", CultureInfo.InvariantCulture), TestProjectYesNoTrue = true }; _envUtil.CreateProject(simpleProject); }