Пример #1
0
        public void SplitValuesTest_StringEmpty_ReturnEmpty()
        {
            SplitValues split  = new SplitValues(delimeter);
            var         values = split.Split(string.Empty);

            Assert.AreEqual(0, values.Count());
        }
Пример #2
0
        public void SplitValuesTest_OneValue_ReturnValue()
        {
            SplitValues split  = new SplitValues(delimeter);
            var         values = split.Split("shoes");

            Assert.AreEqual(1, values.Count());
            Assert.AreEqual("shoes", values.ElementAt(0));
        }
Пример #3
0
        public void SplitValuesTest_TwoValues_ReturnValues()
        {
            SplitValues split  = new SplitValues(delimeter);
            var         values = split.Split("shoes|sandals");

            Assert.AreEqual(2, values.Count());
            Assert.AreEqual("shoes", values.ElementAt(0));
            Assert.AreEqual("sandals", values.ElementAt(1));
        }
Пример #4
0
 public void SplitValuesTest_TwoValuesWrongDelimeterDiv_ThrowException()
 {
     SplitValues split  = new SplitValues(delimeter);
     var         values = split.Split("shoes,sandals");
 }