Exemple #1
0
        public void Setup()
        {
            _transactionScope        = new TransactionScope();
            _appManCoEmailRepository = new AppManCoEmailRepository(ConfigurationManager.ConnectionStrings["Unity"].ConnectionString);
            _manCoRepository         = new ManCoRepository(ConfigurationManager.ConnectionStrings["Unity"].ConnectionString);
            _applicationRepository   = new ApplicationRepository(ConfigurationManager.ConnectionStrings["Unity"].ConnectionString);
            _docTypeRepository       = new DocTypeRepository(ConfigurationManager.ConnectionStrings["Unity"].ConnectionString);
            _manCo1       = BuildMeA.ManCo("description", "code");
            _manCo2       = BuildMeA.ManCo("description2", "code2");
            _application1 = BuildMeA.Application("code", "description");
            _docType1     = BuildMeA.DocType("code", "description");

            _manCoRepository.Create(_manCo1);
            _manCoRepository.Create(_manCo2);
            _applicationRepository.Create(_application1);
            _docTypeRepository.Create(_docType1);

            _appManCoEmail  = BuildMeA.AppManCoEmail(_application1.Id, _manCo1.Id, _docType1.Id, "accountNumber", "email");
            _appManCoEmail2 = BuildMeA.AppManCoEmail(_application1.Id, _manCo2.Id, _docType1.Id, "accountNumber2", "email2");
            _appManCoEmail3 = BuildMeA.AppManCoEmail(_application1.Id, _manCo1.Id, _docType1.Id, "accountNumber3", "email3");
            _appManCoEmail4 = BuildMeA.AppManCoEmail(_application1.Id, _manCo2.Id, _docType1.Id, "accountNumber4", "email4");
        }
Exemple #2
0
        public void GivenABigZip_WhenITryToSaveToTheDatabase_ItIsSavedToTheDatabase()
        {
            int initialCount = _zipFileRepository.Entities.Count();

            _manCoRepository.Create(_manCo);

            ZipFile bigZipFile = BuildMeA.ZipFile(true, "documentSetId", "file1.zip", string.Empty, DateTime.Now);

            _zipFileRepository.Create(bigZipFile);

            _zipFileRepository.Entities.Count().Should().Be(initialCount + 1);
        }
        public void GivenAManCo_WhenITryToSaveToTheDatabase_ItIsSavedToTheDatabase()
        {
            int initialCount = _manCoRepository.Entities.Count();

            _manCoRepository.Create(_manCo1);

            _manCoRepository.Entities.Count().Should().Be(initialCount + 1);
        }
        public void GivenAnAutoApproval_WhenITryToSaveToTheDatabase_ItIsSavedToTheDatabase()
        {
            int initialCount = _autoApprovalRepository.Entities.Count();

            _manCoRepository.Create(_manCo1);
            _manCoRepository.Create(_manCo2);

            _docTypeRepository.Create(_docType);

            _subDocTypeRepository.Create(_subDocType1);
            _subDocTypeRepository.Create(_subDocType2);

            _autoApprovalRepository.Create(_autoApproval);
            _autoApprovalRepository.Create(_autoApproval2);

            _autoApprovalRepository.Entities.Count().Should().Be(initialCount + 2);
        }