Beispiel #1
0
        public void AreasOfWindowsEqualsAreaOfDesktop()
        {
            // ARRANGE
            var input  = mock.CreateWindows(resolution);
            var output = Helper.DeepCopy(input);

            // ACT
            sut.Calculate(output);

            // ASSERT
            Assert.NotNull(output);

            var areaOfWindows = output
                                .Select(window => window.Area())
                                .Sum();

            var areaOfDesktop = sut.ScreenHeight * sut.ScreenWidth;

            Assert.AreEqual(areaOfDesktop, areaOfWindows);
        }