public void TestDuplicatesGeneral()
        {
            AcquisitionMonitor monitor = new AcquisitionMonitor() { Location = Path.Combine(TestFileData.LocalUnitTestDataLocation, "testsets", "duplicates"), ExpectedChannelCount = 2, MinTiffFileSize = 0.1 };

            AcquisitionWorker worker = new AcquisitionWorker(monitor);
            worker.MaxHistoricalDaysToMonitorEmerging = 1;

            bool res = worker.Start().Result;

            while (worker.ExistingQueueSize > 0)
                Thread.Sleep(250);

            Thread.Sleep(1000);

            worker.Stop();

            Assert.AreEqual(2, monitor.Days.Count, "Day count");
            Assert.AreEqual(10, monitor.Tiles.Count, "Tile count");
            Assert.AreEqual(1, monitor.IncompleteTiles.Count, "Incomplete count");
            Assert.AreEqual(4, monitor.Lattice.Duplicates.Count, "Duplicate count");

            Assert.AreEqual(100, monitor.Lattice.Duplicates[0].Position.X);
            Assert.AreEqual(50, monitor.Lattice.Duplicates[0].Position.Y);
            Assert.AreEqual(20, monitor.Lattice.Duplicates[0].Position.Z);
            Assert.AreEqual(3, monitor.Lattice.Duplicates[0].TileCount);

            Assert.AreEqual(100, monitor.Lattice.Duplicates[1].Position.X);
            Assert.AreEqual(55, monitor.Lattice.Duplicates[1].Position.Y);
            Assert.AreEqual(20, monitor.Lattice.Duplicates[1].Position.Z);
            Assert.AreEqual(2, monitor.Lattice.Duplicates[1].TileCount);

            Assert.AreEqual(20, monitor.Lattice.Duplicates[2].Position.X);
            Assert.AreEqual(60, monitor.Lattice.Duplicates[2].Position.Y);
            Assert.AreEqual(40, monitor.Lattice.Duplicates[2].Position.Z);
            Assert.AreEqual(2, monitor.Lattice.Duplicates[2].TileCount);

            Assert.AreEqual(70, monitor.Lattice.Duplicates[3].Position.X);
            Assert.AreEqual(80, monitor.Lattice.Duplicates[3].Position.Y);
            Assert.AreEqual(90, monitor.Lattice.Duplicates[3].Position.Z);
            Assert.AreEqual(2, monitor.Lattice.Duplicates[3].TileCount);
        }
        public void TestIncompleteGeneral()
        {
            AcquisitionMonitor monitor = new AcquisitionMonitor() { Location = Path.Combine(TestFileData.LocalUnitTestDataLocation, "testsets", "incomplete"), ExpectedChannelCount = 2, MinTiffFileSize = 0.1 };

            AcquisitionWorker worker = new AcquisitionWorker(monitor);
            worker.MaxHistoricalDaysToMonitorEmerging = 1;

            bool res = worker.Start().Result;

            while (worker.ExistingQueueSize > 0)
                Thread.Sleep(250);

            worker.Stop();

            Thread.Sleep(1000);

            // Assumes inclusion of an complete empty folder: Test.Unit\data\testsets\incomplete\2015-07-01\00\00011
            // that does not get checked into GitHub as an empty folder.  Create this folder in your local repository
            // to enable this test to pass.
            Assert.AreEqual(2, monitor.Days.Count);
            Assert.AreEqual(13, monitor.Tiles.Count);
            Assert.AreEqual(11, monitor.IncompleteTiles.Count);
            Assert.AreEqual(0, monitor.Lattice.Duplicates.Count);
        }