Exemplo n.º 1
0
        public void UseCaseTest( )
        {
            day08.InitializeScreen(7, 3);
            day08.AddRect(3, 2);

            day08.ShiftColumn(1, 1);
            var shift1 = new List <List <int> >
            {
                new(){ 1, 0, 1, 0, 0, 0, 0 },
                new(){ 1, 1, 1, 0, 0, 0, 0 },
                new(){ 0, 1, 0, 0, 0, 0, 0 },
            };

            Assert.AreEqual(shift1, day08.Screen);

            day08.ShiftRow(0, 4);
            var shift2 = new List <List <int> >
            {
                new(){ 0, 0, 0, 0, 1, 0, 1 },
                new(){ 1, 1, 1, 0, 0, 0, 0 },
                new(){ 0, 1, 0, 0, 0, 0, 0 },
            };

            Assert.AreEqual(shift2, day08.Screen);

            day08.ShiftColumn(1, 1);
            var shift3 = new List <List <int> >
            {
                new(){ 0, 1, 0, 0, 1, 0, 1 },
                new(){ 1, 0, 1, 0, 0, 0, 0 },
                new(){ 0, 1, 0, 0, 0, 0, 0 },
            };

            Assert.AreEqual(shift3, day08.Screen);
        }