public async Task SearchingViewForSpecializedClosedGenericResolvesViewWithMappingForBaseType() { var viewModelType = typeof(StringViewModel); var expected = typeof(StringView); var unit = new DeclarativeViewLocator(); var actual = await unit.ResolveViewTypeForAsync(viewModelType); Assert.AreEqual(expected, actual); }
public async Task SearchingForSpecializedOpenGenericResolvesMatchingView() { var viewModelType = typeof(SpecializeViewModel <>); var expected = typeof(View); var unit = new DeclarativeViewLocator(); var actual = await unit.ResolveViewTypeForAsync(viewModelType); Assert.AreEqual(expected, actual); }