public void GetListOfProperDivisors_Of220_ReturnsCorrectList() { // Arrange var number = 220; var properDivisorsOfNumber = new List <int> { 1, 2, 4, 5, 10, 11, 20, 22, 44, 55, 110 }; // Act var result = DivisorHelper.GetListOfProperDivisors(number); // Assert result.Should().BeEquivalentTo(properDivisorsOfNumber); }
private bool IsAbundantNumber(int n) { return(DivisorHelper.GetListOfProperDivisors(n).Sum() > n); }
private int GetSumOfProperDivisors(int n) { return(DivisorHelper.GetListOfProperDivisors(n).Sum()); }