Esempio n. 1
0
        public void ImageFormating_Rotate_NullBitmap()
        {
            //arrange
            ImageFormating imageFormating = new ImageFormating();

            //act
            //assert
            Assert.Throws <NullReferenceException>(() => imageFormating.Rotate(null));
        }
Esempio n. 2
0
        public void ImageFormating_Rotate_RotateGivenBitmap2()
        {
            //arrange
            ImageFormating imageFormating = new ImageFormating();
            Bitmap         image          = new Bitmap(1, 300);

            //act
            //assert
            Assert.Equal(image.Size, imageFormating.Rotate(image).Size);
        }
Esempio n. 3
0
        public void ImageFormating_Rotate_RotateGivenBitmap1()
        {
            //arrange
            ImageFormating imageFormating = new ImageFormating();
            Bitmap         image          = new Bitmap(300, 1);

            //act
            //assert
            Assert.Equal(image.Width, imageFormating.Rotate(image).Height);
        }
Esempio n. 4
0
        public void ImageFormating_BiggestBlob_NullBitmap()
        {
            //arrange
            Bitmap         image          = null;
            ImageFormating imageFormating = new ImageFormating();

            //act
            //assert
            Assert.Equal(image, imageFormating.BiggestBlob(image));
        }
Esempio n. 5
0
        public void ImageFormating_BiggestBlob_OnePixelImage()
        {
            //arrange
            Bitmap         image          = new Bitmap(1, 1);
            ImageFormating imageFormating = new ImageFormating();

            //act
            //assert
            Assert.Equal(image, imageFormating.BiggestBlob(image));
        }
Esempio n. 6
0
        public void ImageFormating_BiggestBlob_ImageWithoutBlob()
        {
            //arrange
            Bitmap         image          = new Bitmap(50, 100);
            ImageFormating imageFormating = new ImageFormating();

            //act
            //assert
            Assert.Equal(image, imageFormating.BiggestBlob(image));
        }
Esempio n. 7
0
        public void ImageFormating_Rescale_RescaleGivenBitmap()
        {
            //arrange
            Bitmap         image          = new Bitmap(9, 1);
            ImageFormating imageFormating = new ImageFormating();

            //act
            //assert
            Assert.Equal(image, imageFormating.Rescale(image));
        }