Пример #1
0
        public void ContrastPixelNoChange()
        {
            ProgramImage item = new ProgramImage();
            int          r    = 127;
            int          res  = 0;
            int          n    = 0;

            res = item.ContrastPixel(r, n);
            Assert.AreEqual(r, res);
        }
Пример #2
0
        public void ContrastPixelBelowZero()
        {
            // changes for over 255
            ProgramImage item = new ProgramImage();
            int          r    = 0;
            int          res  = 255;
            int          n    = -255;

            res = item.ContrastPixel(r, n);
            Assert.AreEqual(r, res);
        }
Пример #3
0
        public void ContrastPixelCorrect()
        {
            // changes for over 255
            ProgramImage item = new ProgramImage();
            int          r    = 0;
            int          res  = 2;
            int          n    = -1;

            r = item.ContrastPixel(r, n);
            Assert.AreEqual(r, res);
        }