public void Use_of_custom_INavigation_throws() { var navigation = new FakeNavigation(); Assert.Equal( CoreStrings.CustomMetadata(nameof(Use_of_custom_INavigation_throws), nameof(INavigation), nameof(FakeNavigation)), Assert.Throws <NotSupportedException>(() => navigation.AsNavigation()).Message); }
public void Navigation_is_returned_if_it_implements_IClrCollectionAccessor() { var navigation = new FakeNavigation(); var fk = new ForeignKeyTest.FakeForeignKey { PrincipalToDependent = navigation }; navigation.ForeignKey = fk; navigation.PropertyInfo = MyEntity.AsICollectionProperty; Assert.Same(navigation, new ClrCollectionAccessorFactory().Create(navigation)); }
public void Navigation_is_returned_if_it_implements_IClrCollectionAccessor() { var navigation = new FakeNavigation(); Assert.Same(navigation, new ClrCollectionAccessorFactory().Create(navigation)); }