public void NightFilter() { //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.nightFilter(bitmap).Returns<Bitmap>(resultInterf); business.applyNightFilter(bitmap); Assert.AreEqual(business.getFilteredBitmap(),resultInterf); }
//Method to apply the Night Filter public Bitmap applyNightFilter(Bitmap sourceBitmap) { filteredBitmap = filtersInterface.nightFilter(sourceBitmap); return(filteredBitmap); }