public void BlackWhiteFilter() { //Get a real image to test the method instead of using a new empty bitmap ! Bitmap bitmap = Resources.No_filter; Bitmap resultInterf = null; BusinessLayer business = new BusinessLayer(imageInterface, filterInterface, edgeDetectionInterface); filterInterface.blackWhiteFilter(bitmap).Returns<Bitmap>(resultInterf); business.applyBlackWhiteFilter(bitmap); Assert.AreEqual(business.getFilteredBitmap(), resultInterf); }
//Method to apply the Black & White filter public Bitmap applyBlackWhiteFilter(Bitmap sourceBitmap) { filteredBitmap = filtersInterface.blackWhiteFilter(sourceBitmap); return(filteredBitmap); }