public void GetMetadata_NoMatch_ReturnsNull() { // Arrange var items = new object[] { new Metadata3(), new Metadata3(), new Metadata3(), }; var metadata = new EndpointMetadataCollection(items); // Act var result = metadata.GetMetadata <IMetadata5>(); // Assert Assert.Null(result); }
public void GetMetadata_Match_ReturnsLastMatchingEntry() { // Arrange var items = new object[] { new Metadata1(), new Metadata2(), new Metadata3(), }; var metadata = new EndpointMetadataCollection(items); // Act var result = metadata.GetMetadata <IMetadata5>(); // Assert Assert.Same(items[1], result); }