public void EmptyString()
        {
            List <string> perms = DistinctPerms.GetPerms(string.Empty);

            Assert.AreEqual(1, perms.Count);
            Assert.AreEqual(string.Empty, perms[0]);
        }
        public void StringLengthFiveDups()
        {
            string           s     = "aabbc";
            List <string>    perms = DistinctPerms.GetPerms(s);
            HashSet <string> set   = new HashSet <string>(perms);

            Assert.AreEqual(set.Count, perms.Count);
        }
        public void StringMoon()
        {
            string           s     = "moon";
            List <string>    perms = DistinctPerms.GetPerms(s);
            HashSet <string> set   = new HashSet <string>(perms);

            Assert.AreEqual(set.Count, perms.Count);
            Assert.AreEqual(set.Count, 12);
        }
        public void StringRadar()
        {
            string           s     = "radar";
            List <string>    perms = DistinctPerms.GetPerms(s);
            HashSet <string> set   = new HashSet <string>(perms);

            Assert.AreEqual(set.Count, perms.Count);
            Assert.AreEqual(set.Count, 30);
        }
        public void SingletonString()
        {
            string        singleton = "a";
            List <string> perms     = DistinctPerms.GetPerms(singleton);

            Assert.AreEqual(1, perms.Count);
            Assert.AreEqual(singleton, perms[0]);
            HashSet <string> set = new HashSet <string>(perms);

            Assert.AreEqual(set.Count, perms.Count);
        }
 public void NullString()
 {
     Assert.IsNull(DistinctPerms.GetPerms(null));
 }