public void EnumeratingMetadataValuesReturnsCorrectResults() { // Given InitialMetadata initialMetadata = new InitialMetadata { ["A"] = new SimpleMetadataValue {Value = "a"}, ["B"] = new SimpleMetadataValue {Value = "b"}, ["C"] = new SimpleMetadataValue {Value = "c"} }; Metadata metadata = new Metadata(initialMetadata); // When object[] values = metadata.Select(x => x.Value).ToArray(); // Then CollectionAssert.AreEquivalent(new[] {"a", "b", "c"}, values); }
public void EnumeratingMetadataValuesReturnsCorrectResults() { // Given Engine engine = new Engine(); engine.Trace.AddListener(new TestTraceListener()); engine.Metadata["A"] = new SimpleMetadataValue { Value = "a" }; engine.Metadata["B"] = new SimpleMetadataValue { Value = "b" }; engine.Metadata["C"] = new SimpleMetadataValue { Value = "c" }; Metadata metadata = new Metadata(engine); // When object[] values = metadata.Select(x => x.Value).ToArray(); // Then CollectionAssert.AreEquivalent(new [] { "a", "b", "c" }, values); }