Exemple #1
0
        public static void TeoremCalculateThrowsException(int n, int k)
        {
            // Arrange

            // Act

            // Assert
            _ = Assert.Throws <ArgumentException>(() => BinomialCoefficient.Calculate(n, k));
        }
Exemple #2
0
        public static void CalculateFromPairs(int n, int k, long expected)
        {
            // Arrange

            // Act
            var result = BinomialCoefficient.Calculate(n, k);

            // Assert
            Assert.AreEqual(expected, result);
        }