public void GenerateNavigationPropertyLink_ThrowsArgumentNull_EntityContext() { IEdmNavigationProperty navigationProperty = new Mock <IEdmNavigationProperty>().Object; Assert.ThrowsArgumentNull( () => LinkGenerationHelpers.GenerateNavigationPropertyLink(entityContext: null, navigationProperty: navigationProperty, includeCast: false), "entityContext"); }
public void GenerateSelfLink_ThrowsArgument_IfUrlHelperIsNull() { EntityInstanceContext context = new EntityInstanceContext(); Assert.ThrowsArgument( () => LinkGenerationHelpers.GenerateSelfLink(context, includeCast: false), "entityContext", "The property 'Url' of EntityInstanceContext cannot be null."); }
public void GenerateNavigationPropertyLink_ThrowsArgument_IfUrlHelperIsNull() { IEdmNavigationProperty navigationProperty = new Mock <IEdmNavigationProperty>().Object; EntityInstanceContext context = new EntityInstanceContext(); Assert.ThrowsArgument( () => LinkGenerationHelpers.GenerateNavigationPropertyLink(context, navigationProperty, includeCast: false), "entityContext", "The property 'Url' of EntityInstanceContext cannot be null."); }
public void GenerateSelfLink_ThrowsArgumentNull_EntityContext() { Assert.ThrowsArgumentNull( () => LinkGenerationHelpers.GenerateSelfLink(entityContext: null, includeCast: false), "entityContext"); }