예제 #1
0
        public void CanGenerateUniquePointIfProvidedPointToExclude()
        {
            var randomGenerator = new RandomPointGenerator(maxSize);
            var pointToExclude  = new Point(0, 0);
            var point           = randomGenerator.NextPoint(pointToExclude);

            point.Should().NotBeSameAs(pointToExclude);
        }
예제 #2
0
        public void CanGenerateNewPoint()
        {
            var randomGenerator = new RandomPointGenerator(maxSize);
            var point           = randomGenerator.NextPoint();

            point.Should().BeOfType <Point>();
            point.X.Should().BeInRange(minSize, maxSize - 1);
            point.Y.Should().BeInRange(minSize, maxSize - 1);
        }