Exemplo n.º 1
0
        public void MidleLinkChecking(int numberLight, int link2, int link5)
        {
            var light = new LightsInModel(new Point(0, 0), true, 5);

            light.DefinitionLinks(numberLight, 3, 0, 5);

            Assert.AreEqual(link2, light.Links[2]);
            Assert.AreEqual(link5, light.Links[5]);
        }
Exemplo n.º 2
0
        public void BottomLinkChecking(int row, int countRow, int link3, int link4)
        {
            var light = new LightsInModel(new Point(0, 0), true, 5);

            light.DefinitionLinks(9, 5, row, countRow);

            Assert.AreEqual(link3, light.Links[3]);
            Assert.AreEqual(link4, light.Links[4]);
        }
Exemplo n.º 3
0
        public void NegativeTestCreate(int numberLight, int countInRow, int row, int countRow)
        {
            var light = new LightsInModel(new Point(0, 0), true, 5);

            light.DefinitionLinks(numberLight, countInRow, row, countInRow);

            Assert.That(light.Links, Is.All.Not.Null);
            Assert.That(light.Links, Is.Not.Unique);
        }
Exemplo n.º 4
0
        public void TopLinkChecking(int row, int countRow, int link0, int link1)
        {
            var light = new LightsInModel(new Point(0, 0), true, 5);

            light.DefinitionLinks(9, 5, row, countRow);

            Assert.AreEqual(link0, light.Links[0]);
            Assert.AreEqual(link1, light.Links[1]);
        }
Exemplo n.º 5
0
        public void PositiveTestCreate(int numberLight, int countInRow, int row, int countRow)
        {
            var light = new LightsInModel(new Point(0, 0), true, 5);

            light.DefinitionLinks(numberLight, countInRow, row, countInRow);

            // Проверяем, что в массиве нет пустых элементов
            Assert.That(light.Links, Is.All.Not.Null);
            // Проверяем уникальность
            Assert.That(light.Links, Is.Unique);
        }