public void ShouldPrefixTooShortStringWithAllOfItsCharacters()
        {
            var f = new PrefixCategoryFunction("someString", 4);

              Assert.AreEqual("saw", f.OwningPartition("saw"));
              Assert.AreEqual("dog", f.OwningPartition("dog"));
              Assert.AreEqual("cat", f.OwningPartition("cat"));
        }
Example #2
0
        public void ShouldPrefixTooShortStringWithAllOfItsCharacters()
        {
            var f = new PrefixCategoryFunction("someString", 4);

            Assert.AreEqual("saw", f.OwningPartition("saw"));
            Assert.AreEqual("dog", f.OwningPartition("dog"));
            Assert.AreEqual("cat", f.OwningPartition("cat"));
        }
        public void ShouldPartitionStrings()
        {
            var f = new PrefixCategoryFunction("someString", 2);

              Assert.AreEqual("sa", f.OwningPartition("saw"));
              Assert.AreEqual("do", f.OwningPartition("dog"));
              Assert.AreEqual("ca", f.OwningPartition("cat"));
        }
Example #4
0
        public void ShouldPartitionStrings()
        {
            var f = new PrefixCategoryFunction("someString", 2);

            Assert.AreEqual("sa", f.OwningPartition("saw"));
            Assert.AreEqual("do", f.OwningPartition("dog"));
            Assert.AreEqual("ca", f.OwningPartition("cat"));
        }