public void ValueTypeObject_FetchesValueTypeProperty() { const int expected = 123; var element = new ExampleValueType(expected, "ValueType"); var fetcher = new PropertyFetcher("Id"); var actual = fetcher.Fetch <int>(element); Assert.Equal(expected, actual); }
public void ValueTypeObject_FetchesReferenceTypeProperty() { const string expected = "ValueType"; var element = new ExampleValueType(123, expected); var fetcher = new PropertyFetcher("Name"); var actual = fetcher.Fetch <string>(element); Assert.Equal(expected, actual); }