示例#1
0
 public void IronManStep4()
 {
     var algorithms = new Algorithms();
     var element = "dog98cat100bird99";
     var expectedResult = "ZG9nOThjYXQxMDBiaXJkOTk=";
     var result = algorithms.Base64Encode(element);
     Assert.AreEqual(result, expectedResult);
 }
示例#2
0
 public void TheIncredibleHulkStep3()
 {
     var algorithms = new Algorithms();
     var elements = new List<string>
     {
         "dog", "cat","bird"
     };
     var expectedResult = "dog*cat*bird";
     var result = algorithms.ConcatenateArrayText(elements, ConcatenationType.Asterisks);
     Assert.AreEqual(result, expectedResult);
 }
示例#3
0
 public void IronManStep3()
 {
     var algorithms = new Algorithms();
     var elements = new List<string>
     {
         "dog", "cat","bird"
     };
     var expectedResult = "dog98cat100bird99";
     var result = algorithms.ConcatenateArrayText(elements, ConcatenationType.ASCII);
     Assert.AreEqual(result, expectedResult);
 }
示例#4
0
 public void TheIncredibleHulkStep2()
 {
     var algorithms = new Algorithms();
     var elements = new List<string>
     {
         "dog", "cat", "bird"
     };
     var expectedResults = new List<string>
     {
         "dog", "cat", "bird"
     };
     var results = algorithms.SortArray(elements, true);
     CollectionAssert.AreEqual(results.ToArray(), expectedResults);
 }
示例#5
0
 public void IronManStep2() //originally had read = raed, which was a mistake on the challenge specifications.
 {
     var algorithms = new Algorithms();
     var elements = new List<string>
     {
         "hEllo", "bOok", "reAd", "NeEd", "paliNdromE", "happy"
     };
     var expectedResults = new List<string>
     {
         "ohlEl", "boOk", "rAed", "NEed", "EplaNidrmo", "yhpap"
     };
     var results = algorithms.ScrambleArrayText(elements);
     CollectionAssert.AreEqual(results.ToArray(), expectedResults);
 }
示例#6
0
 public void IronManStep1()
 {
     var algorithms = new Algorithms();
     var elements = new List<string>
     {
         "dog", "cat","5zebra", "bird"
     };
     var expectedResults = new List<string>
     {
         "5zebra", "bird", "cat", "dog"
     };
     var results = algorithms.SortArray(elements, false);
     CollectionAssert.AreEqual(results.ToArray(), expectedResults);
 }
 public TheIncredibleHulk(Algorithms algorithms)
 {
     _algorithms = algorithms;
 }
示例#8
0
 public Thor(Algorithms algorithms)
 {
     _algorithms = algorithms;
 }
示例#9
0
 public void ThorStep1()
 {
     var algorithms = new Algorithms();
     var elements = new List<string>
     {
         "aresmoking", "youacklen", "catsdrool", "likings"
     };
     var expectedResults = new List<string>
     {
         "are", "smoking", "you", "acklen", "cats", "drool", "likings"
     };
     var results = algorithms.SplitWords(elements);
     CollectionAssert.AreEqual(results.ToArray(), expectedResults);
 }
示例#10
0
 public void ThorStep4()
 {
     var algorithms = new Algorithms();
     var elements = new List<string>
     {
         "dog", "cat", "bird", "chihuahua"
     };
     var expectedResults = new List<string>
     {
         "d5g", "c8t", "b13rd", "ch21h3455h89144"
     };
     var results = algorithms.FibonacciMagic(elements, 5);
     CollectionAssert.AreEqual(results.ToArray(), expectedResults);
 }
示例#11
0
 public void ThorStep3()
 {
     var algorithms = new Algorithms();
     var elements = new List<string>
     {
         "DoG", "CaT", "BiRd"
     };
     var expectedResults = new List<string>
     {
         "Dog", "Cat", "BirD"
     };
     var results = algorithms.AlternateConsonants(elements);
     CollectionAssert.AreEqual(results.ToArray(), expectedResults);
 }
 public CaptainAmerica(Algorithms algorithms)
 {
     _algorithms = algorithms;
 }
示例#13
0
 public IronMan(Algorithms algorithms)
 {
     _algorithms = algorithms;
 }