public void WhenDifferentAmountsOfDifferentSymbols_ThenGetCorrectAmountOfPermutations() { var result = Permutation.CalculateAmountOfPermutations(new List <int> { 3, 2, 1 }); Assert.AreEqual((6 * 5 * 4 * 3 * 2 * 1 / (3 * 2 * 1 * 2 * 1 * 1)), result); }
public void WhenSameAmountOfDifferentSymbols_ThenGetCorrectAmountOfPermutations() { var result = Permutation.CalculateAmountOfPermutations(new List <int> { 2, 2 }); Assert.AreEqual(4 * 3 * 2 * 1 / (2 * 1 * 2 * 1), result); }