public void ReturnsCorrectResultForList() { // Given InitialMetadata initialMetadata = new InitialMetadata {["A"] = new List<int> {1, 2, 3}}; Metadata metadata = new Metadata(initialMetadata); // When IReadOnlyList<int> result = metadata.List<int>("A"); // Then Assert.IsNotNull(result); CollectionAssert.AreEqual(result, new[] {1, 2, 3}); }
public void ListReturnsCorrectResultForArray() { // Given Engine engine = new Engine(); engine.Trace.AddListener(new TestTraceListener()); engine.Metadata["A"] = new [] { 1, 2, 3 }; Metadata metadata = new Metadata(engine); // When IReadOnlyList<int> result = metadata.List<int>("A"); // Then Assert.IsNotNull(result); CollectionAssert.AreEqual(result, new[] { 1, 2, 3 }); }