public void Combinatorics_GetPermutations_OneString_ShouldNotContainsDuplicates()
 {
     ICombinatorics combinator = new Combinatorics();
     var combinations = combinator.GetPermutation("albero");
     var duplicateItems = combinations.GroupBy(x => x).Where(grouped => grouped.Count() > 1).Select(grouped => grouped.Key);
     Assert.IsTrue(!duplicateItems.Any());
 }
 public void Combinatorics_GetPermutations_OneString_ShouldReturn_Combinatorics()
 {
     ICombinatorics combinator = new Combinatorics();
     var combinations = combinator.GetPermutation("pippo");
     Assert.IsTrue(combinations.Any());
 }
 public void Combinatorics_GetPermutations_OneCharString_ShouldReturn_SameString()
 {
     ICombinatorics combinator = new Combinatorics();
     var combinations = combinator.GetPermutation("a");
     Assert.IsTrue(combinations.FirstOrDefault() == "a");
 }
 public void Combinatorics_GetPermutations_Null_ShouldReturn_EmptyStringList()
 {
     ICombinatorics combinator = new Combinatorics();
     var combinations = combinator.GetPermutation(null);
     Assert.IsTrue(!combinations.Any());
 }