示例#1
0
 public void FirstHalf(string str, string expected)
 {
     //arrange
     Strings obj = new Strings();
     //act
     string actual = obj.FirstHalf(str);
     //assert
     Assert.AreEqual(expected, actual);
 }
示例#2
0
 public void EndsWithLy(string str, bool expected)
 {
     //arrange
     Strings obj = new Strings();
     //act
     bool actual = obj.EndsWithLy(str);
     //assert
     Assert.AreEqual(expected, actual);
 }
示例#3
0
 public void ConCat(string a, string b, string expected)
 {
     //arrange
     Strings obj = new Strings();
     //act
     string actual = obj.ConCat(a, b);
     //assert
     Assert.AreEqual(expected, actual);
 }
示例#4
0
        public void FirstHalf(string str, string expectedResult)
        {
            //Arrange
            Strings test = new Strings();

            //Act
            string actual = test.FirstHalf(str);

            //Assert
            Assert.AreEqual(expectedResult, actual);
        }
示例#5
0
        public void EndsWithLy(string str, bool expectedResult)
        {
            //arrange: get your target class
            Strings test = new Strings();

            //Act : call the method you want to test
            bool actual = test.EndsWithLy(str);

            //Assert: assess target
            Assert.AreEqual(expectedResult, actual);
        }
示例#6
0
        public void Concat(string a, string b, string expectedResult)
        {
            //Arrange: get your target class
            Strings test = new Strings();

            //Act: Call the method
            string actual = test.Concat(a, b);

            //Assert
            Assert.AreEqual(expectedResult, actual);
        }
示例#7
0
        public void AbbaTest(string a, string b, string expectedResult)
        {
            //arrange
            Strings obj = new Strings();

            //act
            string actual = obj.Abba(a, b);

            //assert
            Assert.AreEqual(expectedResult, actual);
        }
示例#8
0
        public void SayHiTest(string name, string expected)
        {
            // arrange
            Strings obj = new Strings();

            // act
            string actual = obj.SayHi(name);

            // assert
            Assert.AreEqual(expected, actual);
        }
示例#9
0
        public void AtFirst(string str, string expectedResult)
        {
            //Arrange: get your target
            Strings test = new Strings();

            //Act: Call the method
            string actual = test.AtFirst(str);

            //Assert
            Assert.AreEqual(expectedResult, actual);
        }
示例#10
0
 public void TrimOne(string str, string expectedResult)
 {
     //arrange
     Strings obj = new Strings();
     //act
     string actual = obj.TrimOne(str);
     //Assert
     Assert.AreEqual(expectedResult, actual);
 }
示例#11
0
 public void TakeTwoFromPosition(string str, int n, string expected)
 {
     //arrange
     Strings obj = new Strings();
     //act
     string actual = obj.TakeTwoFromPosition(str, n);
     //assert
     Assert.AreEqual(expected, actual);
 }
示例#12
0
 public void TakeOne(string str, bool fromFront, string expected)
 {
     //arrange
     Strings obj = new Strings();
     //act
     string actual = obj.TakeOne(str, fromFront);
     //assert
     Assert.AreEqual(expected, actual);
 }
示例#13
0
 public void SwapLast(string str, string expected)
 {
     //arrange
     Strings obj = new Strings();
     //act
     string actual = obj.SwapLast(str);
     //assert
     Assert.AreEqual(expected, actual);
 }
示例#14
0
 public void FrontAndBack(string a, int b, string expResult)
 {
     Strings obj = new Strings();
     string actual = obj.FrontAndBack(a, b);
     Assert.AreEqual(expResult, actual);
 }
示例#15
0
 public void FrontAgain(string str, bool expected)
 {
     //arrange
     Strings obj = new Strings();
     //act
     bool actual = obj.FrontAgain(str);
     //assert
     Assert.AreEqual(expected, actual);
 }
示例#16
0
 public void EndsWithLy(string a, bool expResult)
 {
     Strings obj = new Strings();
     bool actual = obj.EndsWithLy(a);
     Assert.AreEqual(actual, expResult);
 }
示例#17
0
 public void MakeTags(string tag, string content, string expectedResult)
 {
     //arrange
     Strings obj = new Strings();
     //act
     string actual = obj.MakeTags(tag, content);
     //assert
     Assert.AreEqual(expectedResult, actual);
 }
示例#18
0
 public void LastChars(string a, string b, string expected)
 {
     //arrange
     Strings obj = new Strings();
     //act
     string actual = obj.LastChars(a, b);
     //assert
     Assert.AreEqual(expected, actual);
 }
示例#19
0
 public void LongInMiddle(string a, string b, string expected)
 {
     //arrange
     Strings obj = new Strings();
     //act
     string actual = obj.LongInMiddle(a, b);
     //assert
     Assert.AreEqual(expected, actual);
 }
示例#20
0
 public void InsertWord(string container, string word, string expectedResult)
 {
     //arrange
     Strings obj = new Strings();
     //act
     string actual = obj.InsertWord(container, word);
     //assert
     Assert.AreEqual(expectedResult, actual);
 }
示例#21
0
 public void InsertWord(string a, string b, string expResult)
 {
     Strings obj = new Strings();
     string actual = obj.InsertWord(a, b);
     Assert.AreEqual(expResult, actual);
 }
示例#22
0
 public void HasBad(string a, bool expResult)
 {
     Strings obj = new Strings();
     bool actual = obj.HasBad(a);
     Assert.AreEqual(actual, expResult);
 }
示例#23
0
 public void TweakFront(string str, string expected)
 {
     //arrange
     Strings obj = new Strings();
     //act
     string actual = obj.TweakFront(str);
     //assert
     Assert.AreEqual(expected, actual);
 }
示例#24
0
 public void MiddleTwo(string str, string expected)
 {
     //arrange
     Strings obj = new Strings();
     //act
     string actual = obj.MiddleTwo(str);
     //assert
     Assert.AreEqual(expected, actual);
 }
示例#25
0
 public void FirstHalf(string a, string expResult)
 {
     Strings obj = new Strings();
     string actual = obj.FirstHalf(a);
     Assert.AreEqual(expResult, actual);
 }
示例#26
0
 public void MultipleEndings(string str, string expectedResult)
 {
     //arrange
     Strings obj = new Strings();
     //act
     string actual = obj.MultipleEndings(str);
     //assert
     Assert.AreEqual(expectedResult, actual);
 }
示例#27
0
 public void ConCat(string a, string b, string expResult)
 {
     Strings obj = new Strings();
     string actual = obj.ConCat(a, b);
     Assert.AreEqual(expResult, actual);
 }
示例#28
0
 public void RotateRight2(string str, string expected)
 {
     //arrange
     Strings obj = new Strings();
     //act
     string actual = obj.Rotateright2(str);
     //assert
     Assert.AreEqual(expected, actual);
 }
示例#29
0
 public void FrontAndBack(string str, int n, string expected)
 {
     //arrange
     Strings obj = new Strings();
     //act
     string actual = obj.FrontAndBack(str, n);
     //assert
     Assert.AreEqual(expected, actual);
 }
示例#30
0
 public void FrontAgain(string a, bool expResult)
 {
     Strings obj = new Strings();
     bool actual = obj.FrontAgain(a);
     Assert.AreEqual(actual, expResult);
 }