public void ConvertFromBase10ToBase13AndBack(int base10Number) { //act var base13 = baseConverter.ToBaseN(base10Number); var base10 = baseConverter.ToBase10(base13); //assert Assert.AreEqual(base10Number, base10); }
public IEnumerable <string> GeneratePrimeNumbers(string firstNPrimes) { var nPrimes = baseConverter.ToBase10(firstNPrimes); if (nPrimes < 0) { throw new InvalidBaseNValueException(); } var base10Primes = primeNumbers.GenerateNPrimes(nPrimes); return(base10Primes.Select(p => baseConverter.ToBaseN(p))); }