Example #1
0
        public void SetWidthTest(int w, int expected)
        {
            A1_PROG8170.Rectangle _rect = new A1_PROG8170.Rectangle(5, 10);
            int result = _rect.SetWidth(w);

            Assert.AreEqual(expected, result);
        }
Example #2
0
        public void GetLength10Result10()
        {
            A1_PROG8170.Rectangle _rect = new A1_PROG8170.Rectangle(5, 10);
            int result = _rect.GetLength();

            Assert.AreEqual(10, result);
        }
Example #3
0
        public void GetWidth5Result5()
        {
            A1_PROG8170.Rectangle _rect = new A1_PROG8170.Rectangle(5, 10);
            int result = _rect.GetWidth();

            Assert.AreEqual(5, result);
        }
Example #4
0
        public void GetAreaMethodTest(int l, int w, int expected)
        {
            A1_PROG8170.Rectangle _rect = new A1_PROG8170.Rectangle(w, l);
            int result = _rect.GetArea();

            Assert.AreEqual(expected, result);
        }