Exemplo n.º 1
0
        public void testZoomingBotAdd_ThrowsException()
        {
            var zoomingBot = new ZoomingBot(23, new List <int>());

            zoomingBot.AddMicroChip(1);
            zoomingBot.AddMicroChip(2);
            Assert.Throws <ArgumentOutOfRangeException>(() => zoomingBot.AddMicroChip(3));
        }
Exemplo n.º 2
0
        public void testZoomingBotGive()
        {
            var zoomingBot = new ZoomingBot(23, new List <int>());

            zoomingBot.AddMicroChip(1);
            zoomingBot.AddMicroChip(2);
            var low = zoomingBot.GiveMicroChip(false);

            Assert.Equal(1, low);
            zoomingBot.AddMicroChip(11);
            var high = zoomingBot.GiveMicroChip(true);

            Assert.Equal(11, high);
        }
Exemplo n.º 3
0
        public void testZoomingBotAdd()
        {
            var zoomingBot = new ZoomingBot(23, new List <int>());

            zoomingBot.AddMicroChip(1);
            Assert.True(zoomingBot.HasMicroChips(new List <int>()
            {
                1
            }));
            zoomingBot.AddMicroChip(2);
            Assert.True(zoomingBot.HasMicroChips(new List <int>()
            {
                1, 2
            }));
        }