Exemple #1
0
        public void ShouldNotBeAbleAddSomeTagToSameSets()
        {
            BasicTagListBase basicTagListBase = new BasicTagListBase
            {
                Set = "Home"
            };

            basicTagListBase.Add("MyTag");
            basicTagListBase.Add("MyTag");
            basicTagListBase.Tags.Should().HaveCount(1);
        }
Exemple #2
0
        public void ShouldOrderTagsAfterAdd()
        {
            BasicTagListBase basicTagListBase = new BasicTagListBase
            {
                Set = "Home"
            };

            basicTagListBase.Add("MyTagB");
            basicTagListBase.Add("MyTagA");
            basicTagListBase.Tags.Should().HaveCount(2);
            basicTagListBase.Tags[0].Should().Be("MyTagA");
            basicTagListBase.Tags[1].Should().Be("MyTagB");
        }
Exemple #3
0
        public void ShouldAddTagsToCurrentSet()
        {
            BasicTagListBase basicTagListBase = new BasicTagListBase
            {
                Set = "Home"
            };

            basicTagListBase.Add("MyTag");

            basicTagListBase.Set.Should().Be("Home");
            basicTagListBase.Tags.Should().Contain("MyTag");

            basicTagListBase.Set = "Other";
            basicTagListBase.Tags.Should().NotContain("MyTag");
        }
Exemple #4
0
        public void ShouldBeAbleAddSomeTagToDifferentSets()
        {
            BasicTagListBase basicTagListBase = new BasicTagListBase
            {
                Set = "Home"
            };

            basicTagListBase.Add("MyTag");
            basicTagListBase.Set = "Other";
            basicTagListBase.Add("MyTag");

            basicTagListBase.Tags.Should().Contain("MyTag");
            basicTagListBase.Set = "Home";
            basicTagListBase.Tags.Should().Contain("MyTag");
        }