public void CreateSequence_WhenLengthIsZero_ShouldReturnAnEmptyCollection()
            {
                // Arrange
                var subject = new PrimesSequenceGenerator();

                // Act
                var result = subject.CreateSequence(0);

                // Assert
                CollectionAssert.IsEmpty(result);
            }
            public void CreateSequence_WhenLengthIsOne_ShouldReturnTheNumberTwoInACollection()
            {
                // Arrange
                var subject = new PrimesSequenceGenerator();

                // Act
                var result = subject.CreateSequence(1);

                // Assert
                CollectionAssert.AreEqual(new int[] { 2 }, result);
            }
            public void CreateSequence_WhenLengthIsFive_ShouldReturnTheFirstFivePrimes()
            {
                // Arrange
                var subject = new PrimesSequenceGenerator();

                // Act
                var result = subject.CreateSequence(5);

                // Assert
                CollectionAssert.AreEqual(new int[] { 2, 3, 5, 7, 11 }, result);
            }
            public void CreateSequence_WhenLengthIs1000_ShouldReturnTheFirst1000Primes()
            {
                // Arrange
                var subject = new PrimesSequenceGenerator();

                // Act
                var result = subject.CreateSequence(1000);

                // Assert
                CollectionAssert.AreEqual(Primes.FirstThousand, result);
            }
            public void CreateSequence_WhenLengthIsLessThanZero_ShouldThrowAnArgumentOutOfRangeException()
            {
                // Arrange
                var subject = new PrimesSequenceGenerator();

                // Act
                TestDelegate act = () => subject.CreateSequence(-1);

                // Assert
                var ex = Assert.Throws<ArgumentOutOfRangeException>(act);
                Assert.That(ex.ParamName, Is.EqualTo("length"));
                Assert.That(ex.Message, Is.Not.Null);
            }