public void InitializeTest()
        {
            WindowPresenterStub wPresenter = new WindowPresenterStub();
            using (DAL master = GetMaster())
            {
                wPresenter.Database = master;
                MergeComponentsPresenter cmPresenter = new MergeComponentsPresenter(wPresenter, null);

                Assert.IsTrue(cmPresenter.MissingComponents.Count == 0);

            }
        }
        public void ReadCountsTest()
        {
            IWindowPresenter wp = new WindowPresenterStub() { Database = new CruiseDAL.DAL(readTestFile) };
            PrivateObject param0 = new PrivateObject( new DataEditorView(wp));
            DataEditorView_Accessor target = new DataEditorView_Accessor(param0);

            CuttingUnitDO cu = new CuttingUnitDO() { rowID = 1 };
            StratumDO st = new StratumDO() { rowID = 1 };
            SampleGroupDO sg = new SampleGroupDO() { rowID = 1 };

            List<CountTreeDO> expected = null; // TODO: Initialize to an appropriate value
            List<CountTreeDO> actual;
            actual = target.ReadCounts(cu, st, sg);
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }
        public void PerformMergeTest()
        {
            WindowPresenterStub wPresenter = new WindowPresenterStub();
            using (DAL master = GetMaster())
            {
                wPresenter.Database = master;
                MergeComponentsPresenter cmPresenter = new MergeComponentsPresenter(wPresenter, null);

                Assert.IsTrue(cmPresenter.MissingComponents.Count == 0);

                PrepareMergeWorker worker = new PrepareMergeWorker(cmPresenter);
                worker.ProgressChanged += HandleProgressChanged;

                worker.BeginWork();

                worker.Wait();

                MergeSyncWorker syncWorker = new MergeSyncWorker(cmPresenter);
                syncWorker.ProgressChanged += HandleProgressChanged;

                syncWorker.BeginWork();

                syncWorker.Wait();

            }
        }
        public void ReadLogsTest()
        {
            IWindowPresenter wp = new WindowPresenterStub() { Database = new CruiseDAL.DAL(readTestFile) };
            PrivateObject param0 = new PrivateObject(new DataEditorView(wp));
            DataEditorView_Accessor target = new DataEditorView_Accessor(param0);

            CuttingUnitDO cu = new CuttingUnitDO() { rowID = 1 };
            StratumDO st = new StratumDO() { rowID = 1 };
            SampleGroupDO sg = new SampleGroupDO() { rowID = 1 };
            TreeDefaultValueDO tdv = new TreeDefaultValueDO() { rowID = 1 };

            List<LogVM> actual;
            actual = target.ReadLogs(cu, st, sg, tdv);

            Assert.Inconclusive("Verify the correctness of this test method.");
        }
        public void ReadTreesTest()
        {
            IWindowPresenter wp = new WindowPresenterStub() { Database = new CruiseDAL.DAL(readTestFile) };
            PrivateObject param0 = new PrivateObject(new DataEditorView(wp));
            DataEditorView_Accessor target = new DataEditorView_Accessor(param0);

            CuttingUnitDO cu = new CuttingUnitDO() { rowID = 1 };
            StratumDO st = new StratumDO() { rowID = 1 };
            SampleGroupDO sg = new SampleGroupDO() { rowID = 1 };
            TreeDefaultValueDO tdv = new TreeDefaultValueDO() { rowID = 1 };

            List<TreeVM> actual;
            actual = target.ReadTrees(cu, st, sg, tdv);

            Assert.IsNotNull(actual);
            Assert.IsTrue(actual.Count > 0);
        }