public void LoadAllRois_Third_file_coordinates_loads_properly([Values(0, 1, 2, 3)] int iterator)
        {
            var roiDictionaryService = new RoiDictionary(DataStub.TestDirectoryPath);
            var roiDataset           = roiDictionaryService.LoadAllRois();
            var writeTestFileIndex   = 2;
            var obtainedRoi          = roiDataset[writeTestFileIndex];

            Assert.AreEqual(actual: obtainedRoi.RoiPixels[iterator].XCoordinate, expected: DataStub.WriteRoiDataset.RoiPixels[iterator].XCoordinate, message: "Coordinates doesn't match.");
            Assert.AreEqual(actual: obtainedRoi.RoiPixels[iterator].YCoordinate, expected: DataStub.WriteRoiDataset.RoiPixels[iterator].YCoordinate, message: "Coordinates doesn't match.");
        }
        public void GetRoiNames_gets_proper_names()
        {
            var roiDictionaryService = new RoiDictionary(DataStub.TestDirectoryPath);

            roiDictionaryService.LoadAllRois();
            var names = roiDictionaryService.GetRoiNames();

            Assert.AreEqual(actual: names[0], expected: "addtestfile");
            Assert.AreEqual(actual: names[1], expected: "image1");
            Assert.AreEqual(actual: names[2], expected: "writetestfile");
        }
        public void LoadAllRois_Third_file_name_and_dimensions_loads_properly()
        {
            var roiDictionaryService = new RoiDictionary(DataStub.TestDirectoryPath);
            var roiDataset           = roiDictionaryService.LoadAllRois();
            var writeTestFileIndex   = 2;
            var obtainedRoi          = roiDataset[writeTestFileIndex];

            Assert.AreEqual(actual: obtainedRoi.Name, expected: DataStub.WriteRoiDataset.Name, message: "Read name is incorrect.");
            Assert.AreEqual(actual: obtainedRoi.Height, expected: DataStub.WriteRoiDataset.Height, message: "Read height is incorrect.");
            Assert.AreEqual(actual: obtainedRoi.Width, expected: DataStub.WriteRoiDataset.Width, message: "Read width is incorrect.");
        }
        public void Remove_removes_from_dictionary_properly()
        {
            var roiDictionaryService = new RoiDictionary(DataStub.TestDirectoryPath);

            roiDictionaryService.LoadAllRois();

            Assert.IsTrue(File.Exists(Path.Combine(DataStub.TestDirectoryPath, "addtestfile" + ".png")));

            roiDictionaryService.Remove("addtestfile");

            var obtainedRoi = roiDictionaryService.LoadSingleRoiOrDefault("addtestfile");

            Assert.IsNull(obtainedRoi);

            Assert.IsFalse(File.Exists(Path.Combine(DataStub.TestDirectoryPath, "addtestfile" + ".png")));

            roiDictionaryService.Add(DataStub.AddRoiDataset);
        }