public void ProcessTest() { //Arrange IConnectedComponentLabeling target = new CCL(); Bitmap input = new Bitmap(AppDomain.CurrentDomain.BaseDirectory + @"\Test.bmp"); //Act var images = target.Process(input); foreach (var image in images) { image.Value.Save(savePath + image.Key + ".bmp"); } //Assert Assert.AreEqual(2, images.Count); }
public ConnectedComponentLabelingTest() { _baseDirectory = Directory.GetParent(AppDomain.CurrentDomain.BaseDirectory).Parent.FullName; _inputDirectory = Path.Combine(_baseDirectory, "Input"); _connectedComponentLabelling = new CCL(); }