コード例 #1
0
        public void GetTag_ReturnsTagIfCollectionContainsTag()
        {
            TagsCollection target   = new TagsCollection(_tags);
            Tag            returned = target.GetTag(_tags[0].Key);

            Assert.Same(_tags[0], returned);
        }
コード例 #2
0
        public void GetTag_ReturnsTagIfCollectionContainsTag()
        {
            TagsCollection target = new TagsCollection(_tags);
            Tag returned = target.GetTag(_tags[0].Key);

            Assert.Same(_tags[0], returned);
        }
コード例 #3
0
        public void GetTag_ReturnsNullIfCollectionDoesNotContainTag()
        {
            TagsCollection target = new TagsCollection(_tags);

            Assert.Throws<ArgumentException>(() => target.GetTag("other-key"));
        }
コード例 #4
0
        public void GetTag_ReturnsNullForEmptyCollection()
        {
            TagsCollection target = new TagsCollection();

            Assert.Throws<ArgumentException>(() => target.GetTag("other-key"));
        }
コード例 #5
0
        public void GetTag_ReturnsNullIfCollectionDoesNotContainTag()
        {
            TagsCollection target = new TagsCollection(_tags);

            Assert.Throws <ArgumentException>(() => target.GetTag("other-key"));
        }
コード例 #6
0
        public void GetTag_ReturnsNullForEmptyCollection()
        {
            TagsCollection target = new TagsCollection();

            Assert.Throws <ArgumentException>(() => target.GetTag("other-key"));
        }