mirror of
https://bitbucket.org/Mattrixwv/csclasses.git
synced 2025-12-06 18:23:58 -05:00
Moved getPermutations to the correct file
This commit is contained in:
@@ -79,13 +79,5 @@ namespace TestCSClasses{
|
||||
BigInteger bigAnswer = mee.ArrayAlgorithms.GetProd(bigNumbers);
|
||||
Assert.AreEqual(bigCorrectAnswer, bigAnswer, "GetProd BigInteger failed");
|
||||
}
|
||||
[TestMethod]
|
||||
public void TestGetPermutations(){
|
||||
//Test 1
|
||||
string permString = "012";
|
||||
List<string> correctAnswer = new List<string>(){"012", "021", "102", "120", "201", "210"};
|
||||
List<string> answer = mee.ArrayAlgorithms.GetPermutations(permString);
|
||||
CollectionAssert.AreEqual(correctAnswer, answer, "GetPermutations failed");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -28,6 +28,14 @@ using System.Collections.Generic;
|
||||
namespace TestStringAlgorithms{
|
||||
[TestClass]
|
||||
public class TestStringAlgorithms{
|
||||
[TestMethod]
|
||||
public void TestGetPermutations(){
|
||||
//Test 1
|
||||
string permString = "012";
|
||||
List<string> correctAnswer = new List<string>(){"012", "021", "102", "120", "201", "210"};
|
||||
List<string> answer = mee.StringAlgorithms.GetPermutations(permString);
|
||||
CollectionAssert.AreEqual(correctAnswer, answer, "GetPermutations failed");
|
||||
}
|
||||
[TestMethod]
|
||||
public void TestFindNumOccurrence(){
|
||||
//Test 1
|
||||
|
||||
Reference in New Issue
Block a user