public void GetCompleteWordReturnsNullIfWordNotFound()
        {
            var filter = new ProfanityFilter();
            var result = filter.GetCompleteWord("I am a banana and I like to jump.", "c**t");

            Assert.IsNull(result);
        }
        public void GetCompleteWordReturnsNullIfNullInputString()
        {
            var filter = new ProfanityFilter();
            var result = filter.GetCompleteWord(null, "c**t");

            Assert.IsNull(result);
        }
        public void GetCompleteWordReturnsCuntFromSingleWordStringDoubleCunt()
        {
            var filter = new ProfanityFilter();
            var result = filter.GetCompleteWord("c**t c**t", "c**t");

            Assert.AreEqual(result.Value.Item1, 0);
            Assert.AreEqual(result.Value.Item2, 4);
            Assert.AreEqual(result.Value.Item3, "c**t");
        }
        public void GetCompleteWordReturnsCuntFromMidSentence()
        {
            var filter = new ProfanityFilter();
            var result = filter.GetCompleteWord("You are a c**t flap.", "c**t");

            Assert.AreEqual(result.Value.Item1, 10);
            Assert.AreEqual(result.Value.Item2, 14);
            Assert.AreEqual(result.Value.Item3, "c**t");
        }
        public void GetCompleteWordReturnsScunthorpeRangeAtEndOfSentenceNoFullStop()
        {
            var filter = new ProfanityFilter();
            var result = filter.GetCompleteWord("I totally hate living in Scunthorpe", "c**t");

            Assert.AreEqual(result.Value.Item1, 25);
            Assert.AreEqual(result.Value.Item2, 35);
            Assert.AreEqual(result.Value.Item3, "scunthorpe");
        }
        public void GetCompleteWordReturnsScunthorpeRangeAtStartOfSentence()
        {
            var filter = new ProfanityFilter();
            var result = filter.GetCompleteWord("Scunthorpe is my favourite place and it is full of cunts.", "c**t");

            Assert.AreEqual(result.Value.Item1, 0);
            Assert.AreEqual(result.Value.Item2, 10);
            Assert.AreEqual(result.Value.Item3, "scunthorpe");
        }
        public void GetCompleteWordReturnsScunthorpeRangeMidSentence()
        {
            var filter = new ProfanityFilter();
            var result = filter.GetCompleteWord("I live in Scunthorpe and it is full of twats", "c**t");

            Assert.AreEqual(result.Value.Item1, 10);
            Assert.AreEqual(result.Value.Item2, 20);
            Assert.AreEqual(result.Value.Item3, "scunthorpe");
        }