Exemplo n.º 1
0
        public void RandomInts_CheckIfIntIsNotUniqueInList_ReturnsFalse()
        {
            // voeg een al bestaand nummer toe kijk of het stuk gaat.
            List <int> list = new List <int> {
                1, 2, 3, 4, 5
            };
            var        alreadyUsedInt = 5;
            RandomInts random         = new RandomInts(new LoggerMock());

            var result = random.CheckIfIntIsUnique(alreadyUsedInt, list);

            Assert.IsFalse(result);
        }
Exemplo n.º 2
0
        public void RandomInts_CheckIfIntIsUniqueInList_ReturnsTrue()
        {
            // check of het mogelijk is om een nieuw uniek number toe te voegen
            List <int> list = new List <int> {
                1, 2, 3, 4, 5
            };
            var        newInt = 6;
            RandomInts random = new RandomInts(new LoggerMock());

            var result = random.CheckIfIntIsUnique(newInt, list);

            Assert.IsTrue(result);
        }