Beispiel #1
0
        public void CanFindDigitsOfANumber(int number, int[] expected)
        {
            var sut = new MathUtil();
            var actual = sut.GetDigits(number);

            Assert.Equal(expected, actual);
        }
Beispiel #2
0
        public void ShouldFindSumOfDivisorsForNumber(int expected, int number)
        {
            var sut = new MathUtil();
            var actual = sut.GetSumOfDivisors(number);

            Assert.Equal(expected, actual);
        }
Beispiel #3
0
 public AbundantSum(MathUtil mathUtil)
 {
     this._mathUtil = mathUtil;
 }
Beispiel #4
0
 public PalindromeFinder(MathUtil mathUtil)
 {
     this._mathUtil = mathUtil;
 }
 public LexicographicPermutation(MathUtil mathUtil)
 {
     this._mathUtil = mathUtil;
 }
Beispiel #6
0
 public DigitPowerFinder(MathUtil mathUtil)
 {
     this._mathUtil = mathUtil;
 }
Beispiel #7
0
 public AmicableNumberFinder(MathUtil util)
 {
     this._mathUtil = util;
 }
Beispiel #8
0
 public ReciprocalCycle(PrimeFactorFinder primeFactorFinder)
 {
     this._primeFactorFinder = primeFactorFinder;
     this._mathUtil = new MathUtil();
 }