public void Tostring_returns_comma_seperated()
        {
            CommaDelimUpper cd = "AB,cDeF,,a";

            cd.Should().BeEquivalentTo(new[] { "AB", "CDEF", "", "A" });
            cd.ToString().Should().Be("AB,CDEF,,A");
        }
        public void Empty_items_are_returned_as_empty_strings()
        {
            CommaDelimUpper cd = "AB,,cDeF,,a";

            cd.Should().BeEquivalentTo(new[] { "AB", "", "CDEF", "", "A" });
            cd.ToString().Should().Be("AB,,CDEF,,A");
        }
        public void Can_implicitly_create_by_assigning_to_string_and_vice_versa()
        {
            CommaDelimUpper cd = "AB,,cDeF,,a";

            // the reason I assing CD to a strin[] below, is to avoid
            // fluentassertions testing the getEnumerator
            // ...we have a separate test for that below.
            // I want to test 1 thing at a time in a unit test.
            string[] cd2 = cd;
            cd2.Should().BeEquivalentTo(new[] { "AB", "", "CDEF", "", "A" });
        }
Example #4
0
 public CommaUpperCat(CommaDelimUpper kittens)
 {
     Kittens = kittens;
 }