Beispiel #1
0
            public void ClonedMetadataDoesNotContainNewValues()
            {
                // Given
                MetadataDictionary initialMetadata = new MetadataDictionary {["A"] = "a"};
                MetadataStack metadata = new MetadataStack(initialMetadata);

                // When
                MetadataStack clone = metadata.Clone(new Dictionary<string, object> {{"B", "b"}});

                // Then
                Assert.IsFalse(metadata.ContainsKey("B"));
            }
Beispiel #2
0
            public void ReturnsTrueForValidValue()
            {
                // Given
                MetadataDictionary initialMetadata = new MetadataDictionary {["A"] = "a"};
                MetadataStack metadata = new MetadataStack(initialMetadata);

                // When
                bool contains = metadata.ContainsKey("A");

                // Then
                Assert.IsTrue(contains);
            }
Beispiel #3
0
            public void ReturnsTrueForSameKeysWithDifferentCase()
            {
                // Given
                MetadataDictionary initialMetadata = new MetadataDictionary { ["A"] = "a" };
                MetadataStack metadata = new MetadataStack(initialMetadata);

                // When
                bool contains = metadata.ContainsKey("a");

                // Then
                Assert.IsTrue(contains);
            }