コード例 #1
0
        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);
        }
コード例 #2
0
 //Method to apply the Black & White filter
 public Bitmap applyBlackWhiteFilter(Bitmap sourceBitmap)
 {
     filteredBitmap = filtersInterface.blackWhiteFilter(sourceBitmap);
     return(filteredBitmap);
 }