public void TestMethod1() { PrimeNumbers.FactorGen testItem = new PrimeNumbers.FactorGen("67868"); string testResult = testItem.getFactorString(); string expected = "2,2,19,19,47"; Assert.AreEqual(expected, testResult); }
public void TestMethod3() { int testNumber = 2213; int testResult = 1; PrimeNumbers.FactorGen testItem = new PrimeNumbers.FactorGen(testNumber.ToString()); foreach (int item in testItem.factors) { testResult = testResult * item; } Assert.AreEqual(testNumber, testResult); }