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" }); }
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" }); }
public void Parameterless_constructor_should_return_empty_string() { var cd = new CommaDelim(); cd.Should().BeEquivalentTo(new string[0]); }
public void Values_are_indexable() { var cd = new CommaDelim("12,three,four"); Assert.True(cd[1] == "three"); }
public CommaCat(CommaDelim kittens) { Kittens = kittens; }