コード例 #1
0
        public void SetStringValueOrRemoveDoesNotThrowsWhenValueIsNull()
        {
            var tags = new Dictionary <string, string>();

            //Assert.DoesNotThrow
            tags.SetStringValueOrRemove("testKey", null);
        }
コード例 #2
0
        public void SetStringValueOrRemoveSetsCorrectStringValue()
        {
            var tags = new Dictionary <string, string>();

            string testKey   = "testKey";
            string testValue = "testValue";

            tags.SetStringValueOrRemove(testKey, testValue);

            Assert.Equal(testValue, tags[testKey]);
        }
コード例 #3
0
        public void SetStringValueOrRemoveDoesNotThrowsWhenValueIsNull()
        {
            var tags = new Dictionary<string, string>();

            Assert.DoesNotThrow(() => tags.SetStringValueOrRemove("testKey", null));
        }
コード例 #4
0
        public void SetStringValueOrRemoveSetsCorrectStringValue()
        {
            var tags = new Dictionary<string, string>();

            string testKey = "testKey";
            string testValue = "testValue";

            tags.SetStringValueOrRemove(testKey, testValue);

            Assert.Equal(testValue, tags[testKey]);
        }