Exemple #1
0
        public void Before_the_tests()
        {
            _cacheHelper.PurgeAllCaches();

            _lookupRepository          = new LookupDataRepository(_databaseService.DbConnectionHelper, _cacheHelper);
            _organisationValidator     = new OrganisationValidator(null, _lookupRepository, null);
            _providerTypeId1           = 1;
            _providerTypeId2           = 2;
            _providerTypeIdNonExistent = 100;
            _numberOfExpectedResults   = 2;

            _providerType1 = new ProviderTypeModel
            {
                Id           = _providerTypeId1,
                CreatedAt    = DateTime.Now,
                CreatedBy    = "system",
                Status       = "x",
                ProviderType = "a"
            };
            _providerType2 = new ProviderTypeModel
            {
                Id           = _providerTypeId2,
                CreatedAt    = DateTime.Now,
                CreatedBy    = "system",
                Status       = "x",
                ProviderType = "b"
            };
            ProviderTypeHandler.InsertRecord(_providerType1);
            ProviderTypeHandler.InsertRecord(_providerType2);
        }
        public void Before_the_tests()
        {
            _cacheHelper.PurgeAllCaches();
            _lookupRepository         = new LookupDataRepository(_databaseService.WebConfiguration, _cacheHelper);
            _removedReasonId1         = 1;
            _removedReasonId2         = 2;
            _removedReasonNonExistent = 100;
            _numberOfExpectedResults  = 2;

            _removedReason1 = new RemovedReasonModel
            {
                Id          = _removedReasonId1,
                CreatedBy   = "system",
                Status      = "x",
                Reason      = "a",
                Description = "description a"
            };
            _removedReason2 = new RemovedReasonModel
            {
                Id          = _removedReasonId2,
                CreatedBy   = "system",
                Status      = "x",
                Reason      = "b",
                Description = "description b"
            };
            RemovedReasonHandler.InsertRecord(_removedReason1);
            RemovedReasonHandler.InsertRecord(_removedReason2);
        }
        public void Before_the_tests()
        {
            _lookupRepository = new LookupDataRepository(_databaseService.WebConfiguration, _cacheHelper);
            _providerTypeId1  = 1;
            _providerTypeId2  = 2;
            _organisationTypeId1WithProviderTypeId1CategoryId1 = 10;
            _organisationTypeId2WithProviderTypeId1CategoryId1 = 20;
            _organisationTypeId3WithProviderTypeId1CategoryId1 = 30;
            _organisationTypeId3WithProviderTypeId2CategoryId1 = 40;
            _organisationTypeId4WithProviderTypeId2            = 100;
            _cacheHelper.PurgeAllCaches();
            _categoryId1 = 1;
            _categoryId2 = 2;

            OrganisationTypeHandler.InsertRecord(new OrganisationTypeModel {
                Id = _organisationTypeId1WithProviderTypeId1CategoryId1, CreatedAt = DateTime.Now, CreatedBy = "system", Status = "x", Type = "a"
            });
            OrganisationTypeHandler.InsertRecord(new OrganisationTypeModel {
                Id = _organisationTypeId2WithProviderTypeId1CategoryId1, CreatedAt = DateTime.Now, CreatedBy = "system", Status = "x", Type = "b"
            });
            OrganisationTypeHandler.InsertRecord(new OrganisationTypeModel {
                Id = _organisationTypeId3WithProviderTypeId1CategoryId1, CreatedAt = DateTime.Now, CreatedBy = "system", Status = "x", Type = "c"
            });
            OrganisationTypeHandler.InsertRecord(new OrganisationTypeModel {
                Id = _organisationTypeId3WithProviderTypeId2CategoryId1, CreatedAt = DateTime.Now, CreatedBy = "system", Status = "x", Type = "c"
            });
            OrganisationTypeHandler.InsertRecord(new OrganisationTypeModel {
                Id = _organisationTypeId4WithProviderTypeId2, CreatedAt = DateTime.Now, CreatedBy = "system", Status = "x", Type = "d"
            });
            ProviderTypeHandler.InsertRecord(new ProviderTypeModel {
                Id = _providerTypeId1, CreatedAt = DateTime.Now, CreatedBy = "system", Status = "x", ProviderType = "a"
            });
            ProviderTypeHandler.InsertRecord(new ProviderTypeModel {
                Id = _providerTypeId2, CreatedAt = DateTime.Now, CreatedBy = "system", Status = "x", ProviderType = "b"
            });
            OrganisationCategoryHandler.InsertRecord(new OrganisationCategoryModel {
                Id = _categoryId1, Category = "category 1", CreatedAt = DateTime.Now, CreatedBy = "system", Status = "x"
            });
            OrganisationCategoryHandler.InsertRecord(new OrganisationCategoryModel {
                Id = _categoryId2, Category = "category 2", CreatedAt = DateTime.Now, CreatedBy = "system", Status = "x"
            });
            OrganisationCategoryOrgTypeProviderTypeHandler.InsertRecord(new OrganisationCategoryOrgTypeProviderTypeModel {
                Id = 1, OrganisationTypeId = _organisationTypeId1WithProviderTypeId1CategoryId1, ProviderTypeId = _providerTypeId1, OrganisationCategoryId = _categoryId1, CreatedAt = DateTime.Now, CreatedBy = "system", Status = "x"
            });
            OrganisationCategoryOrgTypeProviderTypeHandler.InsertRecord(new OrganisationCategoryOrgTypeProviderTypeModel {
                Id = 2, OrganisationTypeId = _organisationTypeId2WithProviderTypeId1CategoryId1, ProviderTypeId = _providerTypeId1, OrganisationCategoryId = _categoryId1, CreatedAt = DateTime.Now, CreatedBy = "system", Status = "x"
            });
            OrganisationCategoryOrgTypeProviderTypeHandler.InsertRecord(new OrganisationCategoryOrgTypeProviderTypeModel {
                Id = 3, OrganisationTypeId = _organisationTypeId3WithProviderTypeId1CategoryId1, ProviderTypeId = _providerTypeId1, OrganisationCategoryId = _categoryId1, CreatedAt = DateTime.Now, CreatedBy = "system", Status = "x"
            });
            OrganisationCategoryOrgTypeProviderTypeHandler.InsertRecord(new OrganisationCategoryOrgTypeProviderTypeModel {
                Id = 4, OrganisationTypeId = _organisationTypeId3WithProviderTypeId2CategoryId1, ProviderTypeId = _providerTypeId2, OrganisationCategoryId = _categoryId1, CreatedAt = DateTime.Now, CreatedBy = "system", Status = "x"
            });
        }
Exemple #4
0
        public void Before_the_tests()
        {
            _lookupRepository = new LookupDataRepository(_databaseService.DbConnectionHelper, _cacheHelper);
            _providerTypeId1  = 1;
            _providerTypeId2  = 2;
            _organisationStatusId1WithProviderTypeId1 = 10;
            _organisationStatusId2WithProviderTypeId1 = 20;
            _organisationStatusId3WithProviderTypeId1 = 30;
            _organisationStatusId4WithProviderTypeId2 = 100;
            _cacheHelper.PurgeAllCaches();

            OrganisationStatusHandler.InsertRecord(new OrganisationStatusModel {
                Id = _organisationStatusId1WithProviderTypeId1, CreatedAt = DateTime.Now, CreatedBy = "system", Status = "x"
            });
            OrganisationStatusHandler.InsertRecord(new OrganisationStatusModel {
                Id = _organisationStatusId2WithProviderTypeId1, CreatedAt = DateTime.Now, CreatedBy = "system", Status = "x"
            });
            OrganisationStatusHandler.InsertRecord(new OrganisationStatusModel {
                Id = _organisationStatusId3WithProviderTypeId1, CreatedAt = DateTime.Now, CreatedBy = "system", Status = "x"
            });
            OrganisationStatusHandler.InsertRecord(new OrganisationStatusModel {
                Id = _organisationStatusId4WithProviderTypeId2, CreatedAt = DateTime.Now, CreatedBy = "system", Status = "x"
            });
            ProviderTypeHandler.InsertRecord(new ProviderTypeModel {
                Id = _providerTypeId1, CreatedAt = DateTime.Now, CreatedBy = "system", Status = "x", ProviderType = "a"
            });
            ProviderTypeHandler.InsertRecord(new ProviderTypeModel {
                Id = _providerTypeId2, CreatedAt = DateTime.Now, CreatedBy = "system", Status = "x", ProviderType = "b"
            });
            ProviderTypeOrganisationStatusHandler.InsertRecord(new ProviderTypeOrganisationStatusModel {
                Id = 1, OrganisationStatusId = _organisationStatusId1WithProviderTypeId1, ProviderTypeId = _providerTypeId1
            });
            ProviderTypeOrganisationStatusHandler.InsertRecord(new ProviderTypeOrganisationStatusModel {
                Id = 2, OrganisationStatusId = _organisationStatusId2WithProviderTypeId1, ProviderTypeId = _providerTypeId1
            });
            ProviderTypeOrganisationStatusHandler.InsertRecord(new ProviderTypeOrganisationStatusModel {
                Id = 3, OrganisationStatusId = _organisationStatusId3WithProviderTypeId1, ProviderTypeId = _providerTypeId1
            });
            ProviderTypeOrganisationStatusHandler.InsertRecord(new ProviderTypeOrganisationStatusModel {
                Id = 4, OrganisationStatusId = _organisationStatusId4WithProviderTypeId2, ProviderTypeId = _providerTypeId2
            });
        }
        public void Before_the_tests()
        {
            _lookupRepository                = new LookupDataRepository(_databaseService.WebConfiguration, _cacheHelper);
            _organisationValidator           = new OrganisationValidator(null, _lookupRepository, null);
            _organisationStatusId1           = 10;
            _organisationStatusId2           = 20;
            _organisationStatusId3           = 30;
            _organisationStatusIdNonExistent = 100;
            _numberOfExpectedResults         = 3;
            _cacheHelper.PurgeAllCaches();

            OrganisationStatusHandler.InsertRecord(new OrganisationStatusModel {
                Id = _organisationStatusId1, CreatedAt = DateTime.Now, CreatedBy = "system", Status = "a"
            });
            OrganisationStatusHandler.InsertRecord(new OrganisationStatusModel {
                Id = _organisationStatusId2, CreatedAt = DateTime.Now, CreatedBy = "system", Status = "b"
            });
            OrganisationStatusHandler.InsertRecord(new OrganisationStatusModel {
                Id = _organisationStatusId3, CreatedAt = DateTime.Now, CreatedBy = "system", Status = "c"
            });
        }