Exemple #1
0
        public void T08_Join_EmptyGlueEmptyLeftEmptyRight_ResultIsEmpty()
        {
            string glueText  = String.Empty;
            string leftText  = String.Empty;
            string rightText = String.Empty;

            string actualOutput = StringLib.Join2(glueText, leftText, rightText);

            Assert.AreEqual(String.Empty, actualOutput);
        }
Exemple #2
0
        public void T03_Join_EmptyGlueNullLeft_ResultIsRight()
        {
            string glueText  = String.Empty;
            string leftText  = null;
            string rightText = "right";

            string actualOutput = StringLib.Join2(glueText, leftText, rightText);

            Assert.AreEqual("right", actualOutput);
        }
Exemple #3
0
        public void T07_Join_EmptyGlueEmptyRight_ResultIsLeft()
        {
            string glueText  = String.Empty;
            string leftText  = "Left";
            string rightText = String.Empty;

            string actualOutput = StringLib.Join2(glueText, leftText, rightText);

            Assert.AreEqual(leftText, actualOutput);
        }
Exemple #4
0
        public void T02_Join_EmptyGlue_AppendsArgs()
        {
            string glueText  = String.Empty;
            string leftText  = "left";
            string rightText = "right";

            string actualOutput = StringLib.Join2(glueText, leftText, rightText);

            Assert.AreEqual("leftright", actualOutput);
        }
Exemple #5
0
        public void T12_Join_GlueIsSpace_CorrentResult()
        {
            string glueText  = " ";
            string leftText  = "Left";
            string rightText = "Right";

            string actualOutput = StringLib.Join2(glueText, leftText, rightText);

            Assert.AreEqual("Left Right", actualOutput);
        }
Exemple #6
0
        public void T11_Join_NonEmptyArgs_CorrentResult()
        {
            string glueText  = "Glue";
            string leftText  = "Left";
            string rightText = "Right";

            string actualOutput = StringLib.Join2(glueText, leftText, rightText);

            Assert.AreEqual("LeftGlueRight", actualOutput);
        }
Exemple #7
0
        public void T09_Join_EmptyLeft_ResultIsRight()
        {
            string glueText  = "Glue";
            string leftText  = String.Empty;
            string rightText = "Right";

            string actualOutput = StringLib.Join2(glueText, leftText, rightText);

            Assert.AreEqual(rightText, actualOutput);
        }
Exemple #8
0
        public void T01_Join_NullGlue_ThrowsException()
        {
            string glueText = null;

            Assert.Throws <ArgumentNullException>(() => StringLib.Join2(glueText, "left", "right"));
        }