Ejemplo n.º 1
0
        public void ToString_one_element_returned_as_correct_string()
        {
            var entityUnderTest = new DreamTagStringBuilder(new List <DreamMainTag>
            {
                new DreamMainTag("Beach")
            });

            entityUnderTest.ToString().Should().Be("Beach");
        }
Ejemplo n.º 2
0
        public void ToString_one_element_with_children_as_correct_string()
        {
            var dreamMainTag = new DreamMainTag("Beach");

            dreamMainTag.ChildTags.Add(new DreamChildTag("Valencia"));
            dreamMainTag.ChildTags.Add(new DreamChildTag("Gandia"));
            var entityUnderTest = new DreamTagStringBuilder(new List <DreamMainTag>
            {
                dreamMainTag
            });

            entityUnderTest.ToString().Should().Be("Beach (Valencia, Gandia)");
        }
Ejemplo n.º 3
0
        public void ToString_three_elements_with_children_as_correct_string()
        {
            var dreamMainTag1 = new DreamMainTag("Beach");

            dreamMainTag1.ChildTags.Add(new DreamChildTag("Valencia"));
            dreamMainTag1.ChildTags.Add(new DreamChildTag("Gandia"));

            var dreamMainTag2 = new DreamMainTag("Friends");

            dreamMainTag2.ChildTags.Add(new DreamChildTag("John"));

            var entityUnderTest = new DreamTagStringBuilder(new List <DreamMainTag>
            {
                dreamMainTag1,
                new DreamMainTag("Mountain"),
                dreamMainTag2
            });

            entityUnderTest.ToString().Should().Be("Beach (Valencia, Gandia), Mountain, Friends (John)");
        }
Ejemplo n.º 4
0
        public void ToString_empty_collection_returns_empty_string()
        {
            var entityUnderTest = new DreamTagStringBuilder(new List <DreamMainTag>());

            entityUnderTest.ToString().Should().BeEmpty();
        }