Exemple #1
0
        public void ShouldHavePrefix11()
        {
            NoPrefixSet noPrefixSet = new NoPrefixSet();

            string[] sample = ReadFromTextFile("TextFile1.txt");
            var      value  = noPrefixSet.GenerateNodes(sample);

            Assert.Equal("h", value);
        }
Exemple #2
0
        public void ShouldHavePrefix12()
        {
            NoPrefixSet noPrefixSet = new NoPrefixSet();

            string[] sample = { "aab", "aabcde", "abcde", "aabcde", "cedaaa", "bbbbbbbbbb", "jabjjjad" };
            var      value  = noPrefixSet.GenerateNodes(sample);

            Assert.Equal("aabcde", value);
        }
Exemple #3
0
        public void ShouldHavePrefix6()
        {
            NoPrefixSet noPrefixSet = new NoPrefixSet();

            string[] sample = ReadFromTextFile("TextFile2.txt");
            var      value  = noPrefixSet.GenerateNodes(sample);

            Assert.Equal("aaaabbbbbcccccdddddeeeeefffffggggghhjhjiijiiihjhj", value);
        }
Exemple #4
0
        public void ShouldHavePrefix31()
        {
            NoPrefixSet noPrefixSet = new NoPrefixSet();

            string[] sample = { "ball", "bat", "be", "been" };
            var      value  = noPrefixSet.GenerateNodes(sample);

            Assert.Equal("been", value);
        }
Exemple #5
0
        public void ShouldHavePrefix3()
        {
            NoPrefixSet noPrefixSet = new NoPrefixSet();

            string[] sample = { "aab", "aad", "aade", "abc", "adf", "aad", "aac", "aae", "aaf", "aedertg", "aedertt", "aad", "aae", "aaf", "aacghgh", "aabghgh" };
            var      value  = noPrefixSet.GenerateNodes(sample);

            Assert.Equal("aade", value);
        }
Exemple #6
0
        public void ShouldHavePrefix17(string a, string b, string c, string d)
        {
            NoPrefixSet noPrefixSet = new NoPrefixSet();

            string[] sample = { a, b, c, d };
            var      value  = noPrefixSet.GenerateNodes(sample);

            Assert.Equal(c, value);
        }
Exemple #7
0
        public void ShouldHavePrefix10(string a, string b)
        {
            //Arrange
            NoPrefixSet noPrefixSet = new NoPrefixSet();

            string[] sample = { a, b };
            var      value  = noPrefixSet.GenerateNodes(sample);

            //Act
            Assert.Equal(b, value);
        }