public void Tostring_returns_comma_seperated()
        {
            CommaDelim cd = "123,456";

            cd.Should().BeEquivalentTo(new[] { "123", "456" });
            cd.ToString().Should().Be("123,456");
        }
        public void Can_implicitly_create_by_assigning_to_string_and_vice_versa()
        {
            CommaDelim cd = "AB,,cDeF,,a";

            string[] cd2 = cd;
            cd2.Should().BeEquivalentTo(new[] { "AB", "", "cDeF", "", "a" });
        }
Exemplo n.º 3
0
        public void values_can_be_enumerated()
        {
            var cd    = new CommaDelim("12,three,four");
            var items = new List <string>();

            foreach (var c in cd)
            {
                items.Add(c);
            }
            items.ToArray().Should().BeEquivalentTo(new[] { "12", "three", "four" });
        }
Exemplo n.º 4
0
        public void Parameterless_constructor_should_return_empty_string()
        {
            var cd = new CommaDelim();

            cd.Should().BeEquivalentTo(new string[0]);
        }
Exemplo n.º 5
0
        public void Values_are_indexable()
        {
            var cd = new CommaDelim("12,three,four");

            Assert.True(cd[1] == "three");
        }
Exemplo n.º 6
0
 public CommaCat(CommaDelim kittens)
 {
     Kittens = kittens;
 }