Пример #1
0
        public void testwithpunctuations()
        {
            Wordstring test    = new Wordstring("hello. hello! hey.", "hello");
            int        count   = test.count();
            int        counter = 2;

            Assert.AreEqual(counter, count);
        }
Пример #2
0
        public void testcount()
        {
            Wordstring test    = new Wordstring("hello hello hey", "hello");
            int        count   = test.count();
            int        counter = 2;

            Assert.AreEqual(counter, count);
        }
Пример #3
0
        public void testwithnumbers()
        {
            Wordstring test    = new Wordstring("hello3 hello hey", "hello");
            int        count   = test.count();
            int        counter = 1;

            Assert.AreEqual(counter, count);
        }
Пример #4
0
        public void testempty()
        {
            Wordstring test    = new Wordstring("", "hello");
            int        count   = test.count();
            int        counter = 0;

            Assert.AreEqual(counter, count);
        }