public void ImportHplcData()
        {
            // Arrange.
            var autoMocker = new MoqAutoMocker<HplcDataService>();

            var hplcDataService = autoMocker.ClassUnderTest;

            var hplcData = new HplcData { SampleLocation = "" };

            var hplcDatas = new List<HplcData>() { hplcData };

            var mockHplcDataRepository = Mock.Get(autoMocker.Get<IRepository<HplcData>>())
                .Setup(i => i.Add(
                    It.IsAny<HplcData>(),
                    It.IsAny<string>(),
                    It.IsAny<bool>(),
                    It.IsAny<bool>(),
                    It.IsAny<bool>(),
                    It.IsAny<bool>()))
                .Returns(hplcData);

            var mockLogFileGetter = Mock.Get(autoMocker.Get<ILogFileGetter>())
                .Setup(i => i.GetLogFileData(It.IsAny<string>()))
                .Returns(hplcDatas);

            // Act.
            hplcDataService.ImportHplcData("C:\\dev\\PlateletActive\\PlateletActive\\PlateletActive.Infrastructure\\LogFiles\\In",
                "C:\\dev\\PlateletActive\\PlateletActive\\PlateletActive.Infrastructure\\LogFiles\\Out");

            // Assert.
            Assert.IsTrue(true);
        }
Beispiel #2
0
        private void InitMocks4Tests(string gitBranchToInit, out Mock <IGitRepository> gitRepositoryMock,
                                     out Mock <IGitTfsRemote> trunkGitTfsRemoteMock, out Mock <IGitTfsRemote> newBranchRemoteMock, out Mock <ITfsHelper> tfsHelperMock)
        {
            var tfsHelper = mocks.Get <ITfsHelper>();

            tfsHelperMock = Mock.Get(tfsHelper);

            gitRepositoryMock      = Mock.Get(mocks.Get <IGitRepository>()).SetupAllProperties();
            gitRepositoryMock.Name = nameof(gitRepositoryMock);
            gitRepositoryMock.SetupGet(r => r.GitDir).Returns(".");
            gitRepositoryMock.Setup(r => r.HasRemote(It.IsAny <string>())).Returns(true);

            var globals = mocks.Get <Globals>();

            globals.Repository = gitRepositoryMock.Object;
            globals.GitDir     = ".git";

            trunkGitTfsRemoteMock      = new Mock <IGitTfsRemote>().SetupAllProperties();
            trunkGitTfsRemoteMock.Name = nameof(trunkGitTfsRemoteMock);
            var trunkGitTfsRemote = trunkGitTfsRemoteMock.Object;

            trunkGitTfsRemote.TfsUsername       = "******";
            trunkGitTfsRemote.TfsPassword       = "******";
            trunkGitTfsRemote.TfsRepositoryPath = "$/MyProject/Trunk";
            trunkGitTfsRemote.TfsUrl            = "http://myTfsServer:8080/tfs";
            trunkGitTfsRemote.Tfs = tfsHelper;
            //trunkGitTfsRemote.Tfs = new TfsHelper(mocks.Container, null);

            newBranchRemoteMock           = Mock.Get(mocks.Get <IGitTfsRemote>()).SetupAllProperties();
            newBranchRemoteMock.Name      = nameof(newBranchRemoteMock);
            newBranchRemoteMock.Object.Id = gitBranchToInit;
        }
Beispiel #3
0
        public InitBranchTest()
        {
            mocks = new MoqAutoMocker <InitBranch>();
            var globals     = mocks.Get <Globals>();
            var globalsMock = Mock.Get(globals).SetupAllProperties();

            globals.Repository = mocks.Get <IGitRepository>();
        }
Beispiel #4
0
        private void InitMocks4Tests(out Mock <IGitRepository> gitRepositoryMock, out Mock <IGitTfsRemote> remoteMock)
        {
            // mock git repository
            gitRepositoryMock = new Mock <IGitRepository>();
            gitRepositoryMock.Setup(r => r.HasRemote(It.IsAny <string>())).Returns(true);
            _mocks.Get <Globals>().Repository = gitRepositoryMock.Object;

            // mock tfs remote
            _mocks.Get <Globals>().UserSpecifiedRemoteId = "default";
            remoteMock = new Mock <IGitTfsRemote>();
            gitRepositoryMock.Setup(r => r.ReadTfsRemote(It.IsAny <string>())).Returns(remoteMock.Object);
        }
        private CheckinOptionsFactory GetCheckinOptionsFactory(string workItemRegex = null)
        {
            IGitRepository gitRepository = mocks.Get <IGitRepository>();

            mocks.Get <Globals>().Repository = gitRepository;
            mocks.Get <Globals>().GitDir     = ".git";

            var gitRepositoryMock = Mock.Get(gitRepository);

            gitRepositoryMock.Setup(r => r.GitDir).Returns(".");
            gitRepositoryMock.Setup(r => r.GetConfig(GitTfsConstants.WorkItemAssociateRegexConfigKey)).Returns(workItemRegex);

            return(new CheckinOptionsFactory(mocks.Get <Globals>()));
        }
Beispiel #6
0
        public ShelveTest()
        {
            mocks = new MoqAutoMocker <Shelve>();

            var gitRepository = mocks.Get <IGitRepository>();

            gitRepositoryMock = Mock.Get(gitRepository);

            var globals = mocks.Get <Globals>();

            globalsMock        = Mock.Get(globals).SetupAllProperties();
            globals.Repository = gitRepository;

            var gitTfsRemote = mocks.Get <IGitTfsRemote>();

            gitTfsRemoteMock = Mock.Get(gitTfsRemote);
        }
Beispiel #7
0
        public void verify_an_expected_calls()
        {
            var autoMocker    = new MoqAutoMocker <AutoMockerTester.ConcreteClass>();
            var mockedService = autoMocker.Get <AutoMockerTester.IMockedService>();

            autoMocker.ClassUnderTest.CallService();

            var mockedServiceWrapper = Mock.Get(mockedService);

            mockedServiceWrapper.Verify(x => x.Go());
        }
Beispiel #8
0
        public void GivenInvalidResourcePathWhenResourceRequestedThenFileNotFoundException()
        {
            // arrange
            var testClass            = autoMocker.ClassUnderTest;
            var resourceManifestMock = Mock.Get(autoMocker.Get <IResourceManifestFacade>());

            resourceManifestMock.Setup(x => x.GetManifestResourceStream(It.IsAny <string>())).Returns <Stream>(null);

            // act
            Assert.Throws <FileNotFoundException>(() => testClass.LocateScript("test", "test"));
        }
        public void GetNewWorkOrderNumber()
        {
            // Arrange.
            var autoMocker = new MoqAutoMocker <WorkOrderService>();

            var workOrderService = autoMocker.ClassUnderTest;

            var contract = new Models.contract
            {
                contractNumber = "1324-ELE",
                workOrders     = new List <Models.workOrder>
                {
                    new Models.workOrder()
                    {
                        workOrderNumber = "001-1324-ELE-031915-NC"
                    },
                    new Models.workOrder()
                    {
                        workOrderNumber = "002-1324-ELE-032015-NC"
                    }
                }
            };

            var mockContractService = Mock.Get(autoMocker.Get <IService <Models.contract> >());

            mockContractService.Setup(handler => handler.Find(It.IsAny <int>(), It.IsAny <bool>(), It.IsAny <bool>(), It.IsAny <bool>(), It.Is <bool?>(i => true))).Returns(contract);

            var location = new Models.location {
                code = "NC"
            };

            var mockLocationService = Mock.Get(autoMocker.Get <IService <location> >());

            mockLocationService.Setup(handler => handler.Find(It.IsAny <int>(), It.IsAny <bool>(), It.IsAny <bool>(), It.IsAny <bool>(), It.Is <bool?>(i => true))).Returns(location);

            // Act.
            var result = workOrderService.GetNewWorkOrderNumber(1, 1);

            // Assert.
            Assert.AreEqual("003-1324-ELE-" + DateTime.Today.ToString("MMddyy") + "-NC", result, "The work order number does not match up with the assumed output.");
        }
        public Context()
        {
            _moqAutoMocker = new MoqAutoMocker <T>();

            var podcastsModels = new ReadOnlyCollection <PodcastModel>(new List <PodcastModel> {
                new PodcastModel(), new PodcastModel()
            });
            var feed = new FeedModel();

            Mock.Get(_moqAutoMocker.Get <IPodcastService>())
            .Setup(service => service.GetPodcasts())
            .Returns(podcastsModels);

            Mock.Get(_moqAutoMocker.Get <IPodcastService>())
            .Setup(service => service.GetFeed(It.IsAny <Guid>()))
            .Returns(feed);

            Mock.Get(_moqAutoMocker.Get <IPodcastService>())
            .Setup(service => service.AddPodcast(It.IsAny <string>()))
            .Returns(Task.FromResult(true));
        }
Beispiel #11
0
        private static void Main(string[] args)
        {
            // ARRANGE
            var autoMocker = new MoqAutoMocker <SomeService>();
            var sut        = autoMocker.ClassUnderTest;

            Mock.Get(autoMocker.Get <ISomeRepository>()).Setup(m => m.GetSomeString()).Returns("HELLO THERE");

            // ACT
            var actual = sut.GetSomeString();

            // ASSERT
            Console.WriteLine(string.Equals(actual, "HELLO THERE"));
            Console.ReadLine();
        }
Beispiel #12
0
        public Context()
        {
            _moqAutoMocker = new MoqAutoMocker <T>();

            Podcast podcast  = Podcast.Create("http://www.dr.dk/mu/Feed/harddisken?format=podcast&limit=500");
            var     podcasts = new ReadOnlyCollection <Podcast>(new List <Podcast> {
                podcast, podcast
            });
            var podcastsModels = new ReadOnlyCollection <PodcastModel>(new List <PodcastModel> {
                new PodcastModel(), new PodcastModel()
            });
            var feed = new FeedModel();

            Mock.Get(_moqAutoMocker.Get <IPodcastRepository>())
            .Setup(repository => repository.Add(It.IsAny <Podcast>()))
            .Returns(Task.FromResult(true))
            .Callback((Podcast p) => AddedPodcast = p);

            Mock.Get(_moqAutoMocker.Get <IPodcastRepository>())
            .Setup(repository => repository.Delete(It.IsAny <Guid>()))
            .Returns(Task.FromResult(true))
            .Callback((Guid podcastId) => DeletedPodcastId = podcastId);

            Mock.Get(_moqAutoMocker.Get <IPodcastRepository>())
            .Setup(repository => repository.GetAll())
            .Returns(podcasts);

            Mock.Get(_moqAutoMocker.Get <IPodcastRepository>())
            .Setup(repository => repository.Get(It.IsAny <Guid>()))
            .Returns(podcast);

            Mock.Get(_moqAutoMocker.Get <IMapper>())
            .Setup(mapper => mapper.Map <IReadOnlyCollection <PodcastModel> >(It.IsAny <IReadOnlyCollection <Podcast> >()))
            .Returns(podcastsModels);

            Mock.Get(_moqAutoMocker.Get <IMapper>())
            .Setup(mapper => mapper.Map <FeedModel>(It.IsAny <SyndicationFeed>()))
            .Returns(feed);
        }
Beispiel #13
0
 /// <summary>
 /// Gets the mock for the specified type from the underlying container.
 /// </summary>
 /// <typeparam name="TMock"></typeparam>
 /// <returns></returns>
 public Mock <TMock> GetMockFor <TMock>() where TMock : class
 {
     return(Mock.Get(Mocker.Get <TMock>()));
 }
 public CommitSpecificCheckinOptionsFactoryTests()
 {
     mocks = new MoqAutoMocker <CheckinOptionsFactory>();
     mocks.Get <Globals>().Repository = mocks.Get <IGitRepository>();
 }
        public void SetupMocks()
        {
            var serviceMock = new MoqAutoMocker<PostServices>();
            postRepositoryMock = Mock.Get(serviceMock.Get<IPostRepository>());
            appConfigProviderMock = Mock.Get(serviceMock.Get<IAppConfigProvider>());
            tagRepositoryMock = Mock.Get(serviceMock.Get<ITagRepository>());

            SetupPostRepositoryMock(postRepositoryMock);
            SetupTagRepositoryMock(tagRepositoryMock);
            SetupAppConfigProviderMock(appConfigProviderMock);

            service = serviceMock.ClassUnderTest;

            _AddedPost = null;
        }
Beispiel #16
0
        public Mock <TDependencyToMock> Mock <TDependencyToMock>() where TDependencyToMock : class
        {
            var a = autoMocker.Get <TDependencyToMock>();

            return(Moq.Mock.Get(a));
        }
 private CheckinOptionsFactory GetCheckinOptionsFactory()
 {
     return(new CheckinOptionsFactory(mocks.Get <Globals>()));
 }
Beispiel #18
0
        public void ShouldFailWithLessThanOneParents()
        {
            mocks.Get <Globals>().UserSpecifiedRemoteId = "default";
            gitRepositoryMock.Setup(x => x.GetLastParentTfsCommits("my-head")).Returns(new TfsChangesetInfo[0]);

            Assert.NotEqual(GitTfsExitCodes.OK, mocks.ClassUnderTest.Run("don't care", "my-head"));
        }
Beispiel #19
0
 public void ReturnsHelpForTooFewArgs()
 {
     Mock.Get(_mocks.Get <IHelpHelper>()).Setup(x => x.ShowHelpForInvalidArguments(It.IsAny <GitTfsCommand>())).Returns(33);
     Assert.Equal(33, _mocks.ClassUnderTest.Run(new UsesOverloads(), Args()));
 }
        public void SetupTest()
        {
            var serviceMock = new MoqAutoMocker<UserServices>();

            userRepositoryMock = Mock.Get(serviceMock.Get<IUserRepository>());
            appConfigProviderMock = Mock.Get(serviceMock.Get<IAppConfigProvider>());

            existingUser = CreateNewUser();

            SetupUserRepository(userRepositoryMock);

            service = serviceMock.ClassUnderTest;
        }
        private void SetupMocks()
        {
            var serviceMock = new MoqAutoMocker<CommentServices>();

            commentRepositoryMock = Mock.Get(serviceMock.Get<ICommentRepository>());
            appConfigProviderMock = Mock.Get(serviceMock.Get<IAppConfigProvider>());
            userRepository = Mock.Get(serviceMock.Get<IUserRepository>());
            userServicesMock = Mock.Get(serviceMock.Get<UserServices>());

            SetupUserRepositoryMocks();
            SetupCommentRepositoryMocks();
            SetupUserServiceMocks();
            SetupAppConfigMocks();

            service = serviceMock.ClassUnderTest;

            _AddedComment = null;
            user = new User{DateCreated = DateTime.Now, Email = "*****@*****.**", Name = "testuser"};
        }
Beispiel #22
0
 protected Mock <TT> GetMock <TT>() where TT : class
 {
     return(Mock.Get(_autoMocker.Get <TT>()));
 }
Beispiel #23
0
 protected Mock <T> Get <T>()
     where T : class
 {
     return(Mock.Get(MoqAutoMocker.Get <T>()));
 }
Beispiel #24
0
        public void ImportDeductions()
        {
            // Arrange.
            var autoMocker = new MoqAutoMocker <ImportService>();

            var importService = autoMocker.ClassUnderTest;

            var mockImportFileGetter = Mock.Get(autoMocker.Get <IImportFilesGetter>());

            var xElementString =
                @"<dataroot xmlns:od='urn:schemas-microsoft-com:officedata' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'  xsi:noNamespaceSchemaLocation='Deductions.xsd' generated='2016-03-05T17:22:43'>
                                <Deductions>
                                <Contract_x0020_No>1389-HPB</Contract_x0020_No>
                                <Payment_x0020_No>1</Payment_x0020_No>
                                <Date>2015-03-09T00:00:00</Date>
                                <Deduction_x0020_Type>Line H Deduction</Deduction_x0020_Type>
                                <Amount>2594.84</Amount>
                                <Memo>\\lfkbwtmis\Contracts-Tracking\Deductions\1389-HPB - 20150319_154035.pdf</Memo>
                                </Deductions>
                                <Deductions>
                                <Contract_x0020_No>1389-HPB</Contract_x0020_No>
                                <Payment_x0020_No>2</Payment_x0020_No>
                                <Date>2015-03-16T00:00:00</Date>
                                <Deduction_x0020_Type>Line H Release</Deduction_x0020_Type>
                                <Amount>2594.84</Amount>
                                <Memo>\\lfkbwtmis\Contracts-Tracking\Deductions\1389-HPB - 20150319_154059.pdf</Memo>
                                </Deductions>
                                <Deductions>
                                <Contract_x0020_No>1350-ACT</Contract_x0020_No>
                                <Payment_x0020_No>2</Payment_x0020_No>
                                <Date>2015-04-23T00:00:00</Date>
                                <Deduction_x0020_Type>Line H Deduction</Deduction_x0020_Type>
                                <Amount>2544.29</Amount>
                                <Memo>\\lfkbwtmis\Contracts-Tracking\Deductions\1350-ACT - 20150423_140558.pdf</Memo>
                                </Deductions>
                                <Deductions>
                                <Contract_x0020_No>1340-SLRC</Contract_x0020_No>
                                <Payment_x0020_No>2</Payment_x0020_No>
                                <Date>2015-03-02T00:00:00</Date>
                                <Deduction_x0020_Type>Line H Deduction</Deduction_x0020_Type>
                                <Amount>28984</Amount>
                                <Memo></Memo>
                                </Deductions>
                                <Deductions>
                                <Contract_x0020_No>1337-BSN</Contract_x0020_No>
                                <Payment_x0020_No>6</Payment_x0020_No>
                                <Date>2015-06-09T00:00:00</Date>
                                <Deduction_x0020_Type>Line H Deduction</Deduction_x0020_Type>
                                <Amount>3167.1</Amount>
                                <Memo>\\lfkbwtmis\Contracts-Tracking\Deductions\1337-BSN - 20150610_101633.pdf</Memo>
                                </Deductions>
                                <Deductions>
                                <Contract_x0020_No>PW-86</Contract_x0020_No>
                                <Payment_x0020_No>8</Payment_x0020_No>
                                <Date>2014-03-21T00:00:00</Date>
                                <Deduction_x0020_Type>Line A Deduction</Deduction_x0020_Type>
                                <Amount>10344.95</Amount>
                                <Memo>\\lfkbwtmis\Contracts-Tracking\Deductions\PW-86 - 20150618_144325.pdf</Memo>
                                </Deductions>
                                <Deductions>
                                <Contract_x0020_No>PW-86</Contract_x0020_No>
                                <Payment_x0020_No>10</Payment_x0020_No>
                                <Date>2014-05-22T00:00:00</Date>
                                <Deduction_x0020_Type>Line H Deduction</Deduction_x0020_Type>
                                <Amount>27969</Amount>
                                <Memo>\\lfkbwtmis\Contracts-Tracking\Deductions\PW-86 - 20150624_135930.pdf</Memo>
                                </Deductions>
                                <Deductions>
                                <Contract_x0020_No>1350-ACT</Contract_x0020_No>
                                <Payment_x0020_No>3</Payment_x0020_No>
                                <Date>2015-07-07T00:00:00</Date>
                                <Deduction_x0020_Type>Line H to Line A</Deduction_x0020_Type>
                                <Amount>2228.14</Amount>
                                <Memo>\\lfkbwtmis\Contracts-Tracking\Deductions\1350-ACT - 20150708_124845.pdf</Memo>
                                </Deductions>
                                <Deductions>
                                <Contract_x0020_No>1350-ACT</Contract_x0020_No>
                                <Payment_x0020_No>3</Payment_x0020_No>
                                <Date>2015-07-07T00:00:00</Date>
                                <Deduction_x0020_Type>Line H Release</Deduction_x0020_Type>
                                <Amount>316.15</Amount>
                                <Memo>\\lfkbwtmis\Contracts-Tracking\Deductions\1350-ACT - 20150708_125531.pdf</Memo>
                                </Deductions>
                                <Deductions>
                                <Contract_x0020_No>1350-ACT</Contract_x0020_No>
                                <Payment_x0020_No>3</Payment_x0020_No>
                                <Date>2015-07-07T00:00:00</Date>
                                <Deduction_x0020_Type>Line H Deduction</Deduction_x0020_Type>
                                <Amount>1570</Amount>
                                <Memo>\\lfkbwtmis\Contracts-Tracking\Deductions\1350-ACT - 20150708_125603.pdf</Memo>
                                </Deductions>
                                <Deductions>
                                <Contract_x0020_No>1352-ACS</Contract_x0020_No>
                                <Payment_x0020_No>3</Payment_x0020_No>
                                <Date>2014-09-17T00:00:00</Date>
                                <Deduction_x0020_Type>Line H Deduction</Deduction_x0020_Type>
                                <Amount>4174.8</Amount>
                                <Memo>\\lfkbwtmis\Contracts-Tracking\Deductions\1352-ACS - 20150716_111857.pdf</Memo>
                                </Deductions>
                                <Deductions>
                                <Contract_x0020_No>1352-ACS</Contract_x0020_No>
                                <Payment_x0020_No>4</Payment_x0020_No>
                                <Date>2015-04-21T00:00:00</Date>
                                <Deduction_x0020_Type>Line H Deduction</Deduction_x0020_Type>
                                <Amount>7050</Amount>
                                <Memo>\\lfkbwtmis\Contracts-Tracking\Deductions\1352-ACS - 20150716_112233.pdf</Memo>
                                </Deductions>
                                <Deductions>
                                <Contract_x0020_No>1352-ACS</Contract_x0020_No>
                                <Payment_x0020_No>8</Payment_x0020_No>
                                <Date>2015-05-28T00:00:00</Date>
                                <Deduction_x0020_Type>Line H Deduction</Deduction_x0020_Type>
                                <Amount>164.37</Amount>
                                <Memo>\\lfkbwtmis\Contracts-Tracking\Deductions\1352-ACS - 20150716_114353.pdf</Memo>
                                </Deductions>
                                <Deductions>
                                <Contract_x0020_No>1352-ACS</Contract_x0020_No>
                                <Payment_x0020_No>9</Payment_x0020_No>
                                <Date>2015-05-29T00:00:00</Date>
                                <Deduction_x0020_Type>Line H Deduction</Deduction_x0020_Type>
                                <Amount>868.47</Amount>
                                <Memo>\\lfkbwtmis\Contracts-Tracking\Deductions\1352-ACS - 20150716_114941.pdf</Memo>
                                </Deductions>
                                <Deductions>
                                <Contract_x0020_No>1352-ACS</Contract_x0020_No>
                                <Payment_x0020_No>10</Payment_x0020_No>
                                <Date>2015-06-09T00:00:00</Date>
                                <Deduction_x0020_Type>Line H Release</Deduction_x0020_Type>
                                <Amount>500</Amount>
                                <Memo>\\lfkbwtmis\Contracts-Tracking\Deductions\1352-ACS - 20150716_115439.pdf</Memo>
                                </Deductions>
                                <Deductions>
                                <Contract_x0020_No>1352-ACS</Contract_x0020_No>
                                <Payment_x0020_No>10</Payment_x0020_No>
                                <Date>2015-06-09T00:00:00</Date>
                                <Deduction_x0020_Type>Line H to Line A</Deduction_x0020_Type>
                                <Amount>368.47</Amount>
                                <Memo>\\lfkbwtmis\Contracts-Tracking\Deductions\1352-ACS - 20150716_115510.pdf</Memo>
                                </Deductions>
                                <Deductions>
                                <Contract_x0020_No>1352-ACS</Contract_x0020_No>
                                <Payment_x0020_No>10</Payment_x0020_No>
                                <Date>2015-06-09T00:00:00</Date>
                                <Deduction_x0020_Type>Line H to Line A</Deduction_x0020_Type>
                                <Amount>164.37</Amount>
                                <Memo>\\lfkbwtmis\Contracts-Tracking\Deductions\1352-ACS - 20150716_125805.pdf</Memo>
                                </Deductions>
                                <Deductions>
                                <Contract_x0020_No>1352-ACS</Contract_x0020_No>
                                <Payment_x0020_No>10</Payment_x0020_No>
                                <Date>2015-06-09T00:00:00</Date>
                                <Deduction_x0020_Type>Line H Release</Deduction_x0020_Type>
                                <Amount>7050</Amount>
                                <Memo>\\lfkbwtmis\Contracts-Tracking\Deductions\1352-ACS - 20150716_125912.pdf</Memo>
                                </Deductions>
                                <Deductions>
                                <Contract_x0020_No>1352-ACS</Contract_x0020_No>
                                <Payment_x0020_No>11</Payment_x0020_No>
                                <Date>2015-06-19T00:00:00</Date>
                                <Deduction_x0020_Type>Line H Deduction</Deduction_x0020_Type>
                                <Amount>446.7</Amount>
                                <Memo>\\lfkbwtmis\Contracts-Tracking\Deductions\1352-ACS - 20150716_131546.pdf</Memo>
                                </Deductions>
                                <Deductions>
                                <Contract_x0020_No>1351-ACS</Contract_x0020_No>
                                <Payment_x0020_No>3</Payment_x0020_No>
                                <Date>2014-09-17T00:00:00</Date>
                                <Deduction_x0020_Type>Line H Deduction</Deduction_x0020_Type>
                                <Amount>8012.6</Amount>
                                <Memo>\\lfkbwtmis\Contracts-Tracking\Deductions\1351-ACS - 20150720_083707.pdf</Memo>
                                </Deductions>
                                <Deductions>
                                <Contract_x0020_No>1351-ACS</Contract_x0020_No>
                                <Payment_x0020_No>3</Payment_x0020_No>
                                <Date>2015-05-01T00:00:00</Date>
                                <Deduction_x0020_Type>Line H Deduction</Deduction_x0020_Type>
                                <Amount>8564.03</Amount>
                                <Memo>\\lfkbwtmis\Contracts-Tracking\Deductions\1351-ACS - 20150720_090649.pdf</Memo>
                                </Deductions>
                                <Deductions>
                                <Contract_x0020_No>1351-ACS</Contract_x0020_No>
                                <Payment_x0020_No>4</Payment_x0020_No>
                                <Date>2015-04-20T00:00:00</Date>
                                <Deduction_x0020_Type>Line H Deduction</Deduction_x0020_Type>
                                <Amount>16146.6</Amount>
                                <Memo>\\lfkbwtmis\Contracts-Tracking\Deductions\1351-ACS - 20150720_091525.pdf</Memo>
                                </Deductions>
                                <Deductions>
                                <Contract_x0020_No>1351-ACS</Contract_x0020_No>
                                <Payment_x0020_No>5</Payment_x0020_No>
                                <Date>2015-05-21T00:00:00</Date>
                                <Deduction_x0020_Type>Line H Deduction</Deduction_x0020_Type>
                                <Amount>600</Amount>
                                <Memo>\\lfkbwtmis\Contracts-Tracking\Deductions\1351-ACS - 20150720_092621.pdf</Memo>
                                </Deductions>
                                <Deductions>
                                <Contract_x0020_No>1351-ACS</Contract_x0020_No>
                                <Payment_x0020_No>6</Payment_x0020_No>
                                <Date>2015-05-21T00:00:00</Date>
                                <Deduction_x0020_Type>Line H Deduction</Deduction_x0020_Type>
                                <Amount>13.8</Amount>
                                <Memo>\\lfkbwtmis\Contracts-Tracking\Deductions\1351-ACS - 20150720_093140.pdf</Memo>
                                </Deductions>
                                <Deductions>
                                <Contract_x0020_No>1351-ACS</Contract_x0020_No>
                                <Payment_x0020_No>9</Payment_x0020_No>
                                <Date>2015-05-26T00:00:00</Date>
                                <Deduction_x0020_Type>Line H Deduction</Deduction_x0020_Type>
                                <Amount>372.6</Amount>
                                <Memo>\\lfkbwtmis\Contracts-Tracking\Deductions\1351-ACS - 20150720_094421.pdf</Memo>
                                </Deductions>
                                <Deductions>
                                <Contract_x0020_No>1351-ACS</Contract_x0020_No>
                                <Payment_x0020_No>10</Payment_x0020_No>
                                <Date>2015-06-05T00:00:00</Date>
                                <Deduction_x0020_Type>Line H to Line A</Deduction_x0020_Type>
                                <Amount>4091.53</Amount>
                                <Memo>\\lfkbwtmis\Contracts-Tracking\Deductions\1351-ACS - 20150720_095326.pdf</Memo>
                                </Deductions>
                                <Deductions>
                                <Contract_x0020_No>1351-ACS</Contract_x0020_No>
                                <Payment_x0020_No>10</Payment_x0020_No>
                                <Date>2015-06-05T00:00:00</Date>
                                <Deduction_x0020_Type>Line H Release</Deduction_x0020_Type>
                                <Amount>4472.5</Amount>
                                <Memo>\\lfkbwtmis\Contracts-Tracking\Deductions\1351-ACS - 20150720_095350.pdf</Memo>
                                </Deductions>
                                <Deductions>
                                <Contract_x0020_No>1351-ACS</Contract_x0020_No>
                                <Payment_x0020_No>10</Payment_x0020_No>
                                <Date>2015-06-05T00:00:00</Date>
                                <Deduction_x0020_Type>Line H to Line A</Deduction_x0020_Type>
                                <Amount>6806.43</Amount>
                                <Memo>\\lfkbwtmis\Contracts-Tracking\Deductions\1351-ACS - 20150720_095520.pdf</Memo>
                                </Deductions>
                                <Deductions>
                                <Contract_x0020_No>1351-ACS</Contract_x0020_No>
                                <Payment_x0020_No>10</Payment_x0020_No>
                                <Date>2015-06-05T00:00:00</Date>
                                <Deduction_x0020_Type>Line H Release</Deduction_x0020_Type>
                                <Amount>9340.17</Amount>
                                <Memo>\\lfkbwtmis\Contracts-Tracking\Deductions\1351-ACS - 20150720_095541.pdf</Memo>
                                </Deductions>
                                <Deductions>
                                <Contract_x0020_No>1351-ACS</Contract_x0020_No>
                                <Payment_x0020_No>10</Payment_x0020_No>
                                <Date>2015-06-05T00:00:00</Date>
                                <Deduction_x0020_Type>Line H to Line A</Deduction_x0020_Type>
                                <Amount>600</Amount>
                                <Memo>\\lfkbwtmis\Contracts-Tracking\Deductions\1351-ACS - 20150720_095620.pdf</Memo>
                                </Deductions>
                                <Deductions>
                                <Contract_x0020_No>1351-ACS</Contract_x0020_No>
                                <Payment_x0020_No>10</Payment_x0020_No>
                                <Date>2015-06-05T00:00:00</Date>
                                <Deduction_x0020_Type>Line H to Line A</Deduction_x0020_Type>
                                <Amount>13.8</Amount>
                                <Memo>\\lfkbwtmis\Contracts-Tracking\Deductions\1351-ACS - 20150720_095701.pdf</Memo>
                                </Deductions>
                                <Deductions>
                                <Contract_x0020_No>1351-ACS</Contract_x0020_No>
                                <Payment_x0020_No>10</Payment_x0020_No>
                                <Date>2015-06-05T00:00:00</Date>
                                <Deduction_x0020_Type>Line H to Line A</Deduction_x0020_Type>
                                <Amount>187.6</Amount>
                                <Memo>\\lfkbwtmis\Contracts-Tracking\Deductions\1351-ACS - 20150720_095743.pdf</Memo>
                                </Deductions>
                                <Deductions>
                                <Contract_x0020_No>1351-ACS</Contract_x0020_No>
                                <Payment_x0020_No>10</Payment_x0020_No>
                                <Date>2015-06-05T00:00:00</Date>
                                <Deduction_x0020_Type>Line H Release</Deduction_x0020_Type>
                                <Amount>185</Amount>
                                <Memo>\\lfkbwtmis\Contracts-Tracking\Deductions\1351-ACS - 20150720_095849.pdf</Memo>
                                </Deductions>
                                <Deductions>
                                <Contract_x0020_No>1351-ACS</Contract_x0020_No>
                                <Payment_x0020_No>11</Payment_x0020_No>
                                <Date>2015-06-17T00:00:00</Date>
                                <Deduction_x0020_Type>Line H Deduction</Deduction_x0020_Type>
                                <Amount>135.08</Amount>
                                <Memo>\\lfkbwtmis\Contracts-Tracking\Deductions\1351-ACS - 20150720_095945.pdf</Memo>
                                </Deductions>
                                <Deductions>
                                <Contract_x0020_No>1268-FLT-R</Contract_x0020_No>
                                <Payment_x0020_No>1</Payment_x0020_No>
                                <Date>2014-10-08T00:00:00</Date>
                                <Deduction_x0020_Type>Line H Deduction</Deduction_x0020_Type>
                                <Amount>25130.5</Amount>
                                <Memo>\\lfkbwtmis\Contracts-Tracking\Deductions\1268-FLT-R - 20150722_101731.pdf</Memo>
                                </Deductions>
                                <Deductions>
                                <Contract_x0020_No>1268-FLT-R</Contract_x0020_No>
                                <Payment_x0020_No>5</Payment_x0020_No>
                                <Date>2015-04-02T00:00:00</Date>
                                <Deduction_x0020_Type>Line A Deduction</Deduction_x0020_Type>
                                <Amount>23161</Amount>
                                <Memo>\\lfkbwtmis\Contracts-Tracking\Deductions\1268-FLT-R - 20150722_102936.pdf</Memo>
                                </Deductions>
                                <Deductions>
                                <Contract_x0020_No>1268-FLT-R</Contract_x0020_No>
                                <Payment_x0020_No>2</Payment_x0020_No>
                                <Date>2014-10-28T00:00:00</Date>
                                <Deduction_x0020_Type>Line H Release</Deduction_x0020_Type>
                                <Amount>25130.5</Amount>
                                <Memo>\\lfkbwtmis\Contracts-Tracking\Deductions\1268-FLT-R - 20150722_131411.pdf</Memo>
                                </Deductions>
                                <Deductions>
                                <Contract_x0020_No>1330-VFD</Contract_x0020_No>
                                <Payment_x0020_No>1</Payment_x0020_No>
                                <Date>2014-11-07T00:00:00</Date>
                                <Deduction_x0020_Type>Line H Deduction</Deduction_x0020_Type>
                                <Amount>4400</Amount>
                                <Memo>\\lfkbwtmis\Contracts-Tracking\Deductions\1330-VFD - 20150730_120043.pdf</Memo>
                                </Deductions>
                                <Deductions>
                                <Contract_x0020_No>1330-VFD</Contract_x0020_No>
                                <Payment_x0020_No>1</Payment_x0020_No>
                                <Date>2015-03-25T00:00:00</Date>
                                <Deduction_x0020_Type>Line H Release</Deduction_x0020_Type>
                                <Amount>935</Amount>
                                <Memo>\\lfkbwtmis\Contracts-Tracking\Deductions\1330-VFD - 20150730_120215.pdf</Memo>
                                </Deductions>
                                <Deductions>
                                <Contract_x0020_No>1330-VFD</Contract_x0020_No>
                                <Payment_x0020_No>2</Payment_x0020_No>
                                <Date>2015-02-09T00:00:00</Date>
                                <Deduction_x0020_Type>Line H Deduction</Deduction_x0020_Type>
                                <Amount>5854.2</Amount>
                                <Memo>\\lfkbwtmis\Contracts-Tracking\Deductions\1330-VFD - 20150730_120305.pdf</Memo>
                                </Deductions>
                                <Deductions>
                                <Contract_x0020_No>1330-VFD</Contract_x0020_No>
                                <Payment_x0020_No>2</Payment_x0020_No>
                                <Date>2015-06-30T00:00:00</Date>
                                <Deduction_x0020_Type>Line H Release</Deduction_x0020_Type>
                                <Amount>5854.2</Amount>
                                <Memo>\\lfkbwtmis\Contracts-Tracking\Deductions\1330-VFD - 20150730_120351.pdf</Memo>
                                </Deductions>
                                <Deductions>
                                <Contract_x0020_No>1330-VFD</Contract_x0020_No>
                                <Payment_x0020_No>3</Payment_x0020_No>
                                <Date>2015-06-26T00:00:00</Date>
                                <Deduction_x0020_Type>Line H to Line A</Deduction_x0020_Type>
                                <Amount>1195</Amount>
                                <Memo>\\lfkbwtmis\Contracts-Tracking\Deductions\1330-VFD - 20150730_120700.pdf</Memo>
                                </Deductions>
                                <Deductions>
                                <Contract_x0020_No>1350-ACT</Contract_x0020_No>
                                <Payment_x0020_No>4</Payment_x0020_No>
                                <Date>2015-08-12T00:00:00</Date>
                                <Deduction_x0020_Type>Line H Deduction</Deduction_x0020_Type>
                                <Amount>5495</Amount>
                                <Memo>\\lfkbwtmis\Contracts-Tracking\Deductions\1350-ACT - 20150812_113107.pdf</Memo>
                                </Deductions>
                                <Deductions>
                                <Contract_x0020_No>1352-ACS</Contract_x0020_No>
                                <Payment_x0020_No>13</Payment_x0020_No>
                                <Date>2015-09-28T00:00:00</Date>
                                <Deduction_x0020_Type>Line H Deduction</Deduction_x0020_Type>
                                <Amount>2508.37</Amount>
                                <Memo>\\lfkbwtmis\Contracts-Tracking\Deductions\1352-ACS - 20151002_090402.pdf</Memo>
                                </Deductions>
                                <Deductions>
                                <Contract_x0020_No>1351-ACS</Contract_x0020_No>
                                <Payment_x0020_No>13</Payment_x0020_No>
                                <Date>2015-10-06T00:00:00</Date>
                                <Deduction_x0020_Type>Line H Deduction</Deduction_x0020_Type>
                                <Amount>8332.97</Amount>
                                <Memo>\\lfkbwtmis\Contracts-Tracking\Deductions\1351-ACS - 20151019_094354.pdf</Memo>
                                </Deductions>
                                <Deductions>
                                <Contract_x0020_No>1352-ACS</Contract_x0020_No>
                                <Payment_x0020_No>14</Payment_x0020_No>
                                <Date>2015-11-04T00:00:00</Date>
                                <Deduction_x0020_Type>Line H Release</Deduction_x0020_Type>
                                <Amount>2327.01</Amount>
                                <Memo>\\lfkbwtmis\Contracts-Tracking\Deductions\1352-ACS - 20151105_082506.pdf</Memo>
                                </Deductions>
                                <Deductions>
                                <Contract_x0020_No>1352-ACS</Contract_x0020_No>
                                <Payment_x0020_No>14</Payment_x0020_No>
                                <Date>2015-11-04T00:00:00</Date>
                                <Deduction_x0020_Type>Line H to Line A</Deduction_x0020_Type>
                                <Amount>181.36</Amount>
                                <Memo>\\lfkbwtmis\Contracts-Tracking\Deductions\1352-ACS - 20151105_082551.pdf</Memo>
                                </Deductions>
                                <Deductions>
                                <Contract_x0020_No>1352-ACS</Contract_x0020_No>
                                <Payment_x0020_No>14</Payment_x0020_No>
                                <Date>2015-10-30T00:00:00</Date>
                                <Deduction_x0020_Type>Line H Deduction</Deduction_x0020_Type>
                                <Amount>2715.84</Amount>
                                <Memo>\\lfkbwtmis\Contracts-Tracking\Deductions\1352-ACS - 20151105_082627.pdf</Memo>
                                </Deductions>
                                <Deductions>
                                <Contract_x0020_No>1350-ACT</Contract_x0020_No>
                                <Payment_x0020_No>5</Payment_x0020_No>
                                <Date>2015-11-13T00:00:00</Date>
                                <Deduction_x0020_Type>Line H Release</Deduction_x0020_Type>
                                <Amount>7065</Amount>
                                <Memo>\\lfkbwtmis\Contracts-Tracking\Deductions\1350-ACT - 20151118_073358.pdf</Memo>
                                </Deductions>
                                <Deductions>
                                <Contract_x0020_No>1351-ACS</Contract_x0020_No>
                                <Payment_x0020_No>14</Payment_x0020_No>
                                <Date>2015-11-20T00:00:00</Date>
                                <Deduction_x0020_Type>Line H to Line A</Deduction_x0020_Type>
                                <Amount>71.75</Amount>
                                <Memo>\\lfkbwtmis\Contracts-Tracking\Deductions\1351-ACS - 20151125_075544.pdf</Memo>
                                </Deductions>
                                <Deductions>
                                <Contract_x0020_No>1351-ACS</Contract_x0020_No>
                                <Payment_x0020_No>14</Payment_x0020_No>
                                <Date>2015-11-20T00:00:00</Date>
                                <Deduction_x0020_Type>Line H Release</Deduction_x0020_Type>
                                <Amount>8261.22</Amount>
                                <Memo>\\lfkbwtmis\Contracts-Tracking\Deductions\1351-ACS - 20151125_075608.pdf</Memo>
                                </Deductions>
                                <Deductions>
                                <Contract_x0020_No>1351-ACS</Contract_x0020_No>
                                <Payment_x0020_No>13</Payment_x0020_No>
                                <Date>2015-11-16T00:00:00</Date>
                                <Deduction_x0020_Type>Line A Deduction</Deduction_x0020_Type>
                                <Amount>216.5</Amount>
                                <Memo>\\lfkbwtmis\Contracts-Tracking\Deductions\1351-ACS - 20151207_110730.pdf</Memo>
                                </Deductions>
                                <Deductions>
                                <Contract_x0020_No>1352-ACS</Contract_x0020_No>
                                <Payment_x0020_No>15</Payment_x0020_No>
                                <Date>2015-12-14T00:00:00</Date>
                                <Deduction_x0020_Type>Line H to Line A</Deduction_x0020_Type>
                                <Amount>923.95</Amount>
                                <Memo>\\lfkbwtmis\Contracts-Tracking\Deductions\1352-ACS - 20151214_113359.pdf</Memo>
                                </Deductions>
                                <Deductions>
                                <Contract_x0020_No>1352-ACS</Contract_x0020_No>
                                <Payment_x0020_No>15</Payment_x0020_No>
                                <Date>2015-12-14T00:00:00</Date>
                                <Deduction_x0020_Type>Line H Release</Deduction_x0020_Type>
                                <Amount>1791.89</Amount>
                                <Memo>\\lfkbwtmis\Contracts-Tracking\Deductions\1352-ACS - 20151214_113416.pdf</Memo>
                                </Deductions>
                                <Deductions>
                                <Contract_x0020_No>1350-ACT</Contract_x0020_No>
                                <Payment_x0020_No>6</Payment_x0020_No>
                                <Date>2015-12-15T00:00:00</Date>
                                <Deduction_x0020_Type>Line H Deduction</Deduction_x0020_Type>
                                <Amount>2714.2</Amount>
                                <Memo>\\lfkbwtmis\Contracts-Tracking\Deductions\1350-ACT - 20151215_100520.pdf</Memo>
                                </Deductions>
                                <Deductions>
                                <Contract_x0020_No>PW-86</Contract_x0020_No>
                                <Payment_x0020_No>20</Payment_x0020_No>
                                <Date>2015-12-17T00:00:00</Date>
                                <Deduction_x0020_Type>Line H Deduction</Deduction_x0020_Type>
                                <Amount>36795</Amount>
                                <Memo>\\lfkbwtmis\Contracts-Tracking\Deductions\PW-86 - 20151217_151010.pdf</Memo>
                                </Deductions>
                                <Deductions>
                                <Contract_x0020_No>1325-CR</Contract_x0020_No>
                                <Payment_x0020_No>15</Payment_x0020_No>
                                <Date>2015-12-21T00:00:00</Date>
                                <Deduction_x0020_Type>Line H Deduction</Deduction_x0020_Type>
                                <Amount>20540</Amount>
                                <Memo>\\lfkbwtmis\Contracts-Tracking\Deductions\1325-CR - 20151224_093522.pdf</Memo>
                                </Deductions>
                                <Deductions>
                                <Contract_x0020_No>1372-BRN</Contract_x0020_No>
                                <Payment_x0020_No>10</Payment_x0020_No>
                                <Date>2016-01-05T00:00:00</Date>
                                <Deduction_x0020_Type>Line H Deduction</Deduction_x0020_Type>
                                <Amount>4250</Amount>
                                <Memo>\\lfkbwtmis\Contracts-Tracking\Deductions\1372-BRN - 20160106_130059.pdf</Memo>
                                </Deductions>
                                <Deductions>
                                <Contract_x0020_No>PW-86</Contract_x0020_No>
                                <Payment_x0020_No>21</Payment_x0020_No>
                                <Date>2016-01-08T00:00:00</Date>
                                <Deduction_x0020_Type>Line H Deduction</Deduction_x0020_Type>
                                <Amount>129250.8</Amount>
                                <Memo>\\lfkbwtmis\Contracts-Tracking\Deductions\PW-86 - 20160111_080516.pdf</Memo>
                                </Deductions>
                                <Deductions>
                                <Contract_x0020_No>1372-BRN</Contract_x0020_No>
                                <Payment_x0020_No>11</Payment_x0020_No>
                                <Date>2016-02-03T00:00:00</Date>
                                <Deduction_x0020_Type>Line H Release</Deduction_x0020_Type>
                                <Amount>4250</Amount>
                                <Memo>\\lfkbwtmis\Contracts-Tracking\Deductions\1372-BRN - 20160203_110404.pdf</Memo>
                                </Deductions>
                                <Deductions>
                                <Contract_x0020_No>1350-ACT</Contract_x0020_No>
                                <Payment_x0020_No>7</Payment_x0020_No>
                                <Date>2016-02-03T00:00:00</Date>
                                <Deduction_x0020_Type>Line H Release</Deduction_x0020_Type>
                                <Amount>40.7</Amount>
                                <Memo>\\lfkbwtmis\Contracts-Tracking\Deductions\1350-ACT - 20160204_073338.pdf</Memo>
                                </Deductions>
                                <Deductions>
                                <Contract_x0020_No>1350-ACT</Contract_x0020_No>
                                <Payment_x0020_No>7</Payment_x0020_No>
                                <Date>2016-02-03T00:00:00</Date>
                                <Deduction_x0020_Type>Line H to Line A</Deduction_x0020_Type>
                                <Amount>2673.5</Amount>
                                <Memo>\\lfkbwtmis\Contracts-Tracking\Deductions\1350-ACT - 20160204_073406.pdf</Memo>
                                </Deductions>
                                </dataroot>";

            var xElement = XElement.Parse(xElementString);

            mockImportFileGetter.Setup(handler => handler.GetXML(It.IsAny <string>(), It.IsAny <string>())).Returns(xElement);

            var mockXmlValidatorService = Mock.Get(autoMocker.Get <IXmlValidatorService>());

            mockXmlValidatorService.Setup(handler => handler.IsValidXml(It.IsAny <string>(), It.IsAny <string>())).Returns(true);

            var directory = @"R:\dev2\ContractTrackingManagement\ContractTrackingManagement\ContractTrackingManagement.Console\bin\Debug\access-contractdb-xml";

            // Act.
            importService.ImportDeductions(directory);

            // Assert.
            Assert.IsTrue(!importService.Errors.Any());
        }
Beispiel #25
0
        public void ImportChangeOrder()
        {
            // Arrange.
            var autoMocker = new MoqAutoMocker <ImportService>();

            var importService = autoMocker.ClassUnderTest;

            var mockImportFileGetter = Mock.Get(autoMocker.Get <IImportFilesGetter>());

            var xElementString = "<dataroot xmlns:od=\"urn:schemas-microsoft-com:officedata\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"Change%20Order.xsd\" generated=\"2016-03-05T17:18:46\">" +
                                 @"<Change_x0020_Order>
                            <Contract_x0020_No>1325-CR</Contract_x0020_No>
                            <Change_x0020_Order_x0020_Type>Overrun</Change_x0020_Order_x0020_Type>
                            <Change_x0020_Order_x0020_No>1</Change_x0020_Order_x0020_No>
                            <Description>Overrun for Contract Bid Items 1, 11, 12 and 15</Description>
                            <Reason_x0020_for_x0020_Change_x0020_Order>
                            Absence of south region contract has put burden of repair and inspections on north region contract.
                            </Reason_x0020_for_x0020_Change_x0020_Order>
                            <Identification_x0020_Date>2015-01-17T00:00:00</Identification_x0020_Date>
                            <Engineer_x0027_s_x0020_Estimate>483000</Engineer_x0027_s_x0020_Estimate>
                            <Proposal_x0020_Date>2014-01-17T00:00:00</Proposal_x0020_Date>
                            <Proposal_x0020_Amount>483000</Proposal_x0020_Amount>
                            <BWT_x0020_Approval_x0020_Date>2014-01-31T00:00:00</BWT_x0020_Approval_x0020_Date>
                            <BWT_x0020_Approval_x0020_Amount>483000</BWT_x0020_Approval_x0020_Amount>
                            <Registered_x0020_Amount>483000</Registered_x0020_Amount>
                            <Registered>2014-03-05T00:00:00</Registered>
                            <MemoPDF>
                            \\lfkbwtmis\Contracts-Tracking\RegisteredCO\1325-CR - OV# 1 - 20150403_075658.pdf
                            </MemoPDF>
                            </Change_x0020_Order>
                            <Change_x0020_Order>
                            <Contract_x0020_No>1325-CR</Contract_x0020_No>
                            <Change_x0020_Order_x0020_Type>Change Order (Parts and Materials)</Change_x0020_Order_x0020_Type>
                            <Change_x0020_Order_x0020_No>1</Change_x0020_Order_x0020_No>
                            <Description>Part and material</Description>
                            <Reason_x0020_for_x0020_Change_x0020_Order>Need parts for additional repairs</Reason_x0020_for_x0020_Change_x0020_Order>
                            <Identification_x0020_Date>2014-12-30T00:00:00</Identification_x0020_Date>
                            <Engineer_x0027_s_x0020_Estimate>50000</Engineer_x0027_s_x0020_Estimate>
                            <Proposal_x0020_Date>2014-12-30T00:00:00</Proposal_x0020_Date>
                            <Proposal_x0020_Amount>50000</Proposal_x0020_Amount>
                            <BWT_x0020_Approval_x0020_Date>2014-12-30T00:00:00</BWT_x0020_Approval_x0020_Date>
                            <BWT_x0020_Approval_x0020_Amount>50000</BWT_x0020_Approval_x0020_Amount>
                            <Registered_x0020_Amount>50000</Registered_x0020_Amount>
                            <Registered>2015-04-07T00:00:00</Registered>
                            <MemoPDF>
                            \\lfkbwtmis\Contracts-Tracking\RegisteredCO\1325-CR - CO# 1 - 20150806_110945.pdf
                            </MemoPDF>
                            </Change_x0020_Order>
                            </dataroot>";

            var xElement = XElement.Parse(xElementString);

            mockImportFileGetter.Setup(handler => handler.GetXML(It.IsAny <string>(), It.IsAny <string>())).Returns(xElement);

            var mockXmlValidatorService = Mock.Get(autoMocker.Get <IXmlValidatorService>());

            mockXmlValidatorService.Setup(handler => handler.IsValidXml(It.IsAny <string>(), It.IsAny <string>())).Returns(true);

            var directory = @"R:\dev2\ContractTrackingManagement\ContractTrackingManagement\ContractTrackingManagement.Console\bin\Debug\access-contractdb-xml";

            // Act.
            importService.ImportChangeOrders(directory);

            // Assert.
            Assert.IsTrue(!importService.Errors.Any());
        }