コード例 #1
0
        public void GetPositionsTest4()
        {
            HomeController controller = new HomeController();

            var text = "Polly put the kettle on, polly put the kettle on, polly put the kettle on we’ll all have tea";
            var subText = "the";

            var positions = controller.GetPositions( text, subText );

            // Assert
            Assert.AreEqual( "11, 36, 61", positions );
        }
コード例 #2
0
        public void GetPositionsTest10()
        {
            HomeController controller = new HomeController();

            var text = "Polly put the kettle on, polly put the kettle on, polly put the kettle on we’ll all have tea";
            var subText = "Polly put the kettle on, polly put the kettle on, polly put the kettle on we’ll all have tea Polx";

            var positions = controller.GetPositions( text, subText );

            // Assert
            Assert.AreEqual( "There is no output", positions );
        }
コード例 #3
0
        public void GetPositionsTest5()
        {
            HomeController controller = new HomeController();

            var text = "Polly put the kettle on, polly put the kettle on, polly put the kettle on we’ll all have tea";
            var subText = "ll";

            var positions = controller.GetPositions( text, subText );

            // Assert
            Assert.AreEqual( "3, 28, 53, 78, 82", positions );
        }