Exemplo n.º 1
0
        public void AddTags_ShouldNotAddTagsToTagsProperty_WhenNullPassed()
        {
            // Arrange
            var resource = new TestResource();

            // Act
            resource.AddTags(null);

            // Assert
            resource.Tags.Should().BeEmpty();
        }
Exemplo n.º 2
0
        public void AddTags_ShouldAddTagsToTagsProperty()
        {
            // Arrange
            var resource = new TestResource();
            var key      = "key";
            var value    = "value";
            var tags     = new Dictionary <string, string> {
                { key, value }
            };

            // Act
            resource.AddTags(tags);

            // Assert
            resource.Tags.Should().HaveCount(1);
            resource.Tags.Should().ContainKey(key);
            resource.Tags.First().Value.Should().Be(value);
        }