/// <summary>
        /// Fires before navigation start.
        /// </summary>
        /// <param name="link">The link.</param>
        /// <param name="source">The source.</param>
        /// <param name="target">The target.</param>
        internal void ExecuteOnNavigationLinkStartActions(ODataNavigationLink link, object source, object target)
        {
            Debug.Assert(link != null, "link != null");

            if (this.writingStartNavigationLinkActions.Count > 0)
            {
                WritingNavigationLinkArgs args = new WritingNavigationLinkArgs(link, source, target);
                foreach (Action <WritingNavigationLinkArgs> navArgsAction in this.writingStartNavigationLinkActions)
                {
                    navArgsAction(args);
                }
            }
        }
        /// <summary>
        /// Fires before navigation start.
        /// </summary>
        /// <param name="link">The link.</param>
        /// <param name="source">The source.</param>
        /// <param name="target">The target.</param>
        internal void ExecuteOnNavigationLinkStartActions(ODataNavigationLink link, object source, object target)
        {
            Debug.Assert(link != null, "link != null");

            if (this.writingStartNavigationLinkActions.Count > 0)
            {
                WritingNavigationLinkArgs args = new WritingNavigationLinkArgs(link, source, target);
                foreach (Action<WritingNavigationLinkArgs> navArgsAction in this.writingStartNavigationLinkActions)
                {
                    navArgsAction(args);
                }
            }
        }
 private static void VerifyWritingNavigationLinkArgs(WritingNavigationLinkArgs args, string associationLinkUrl, object source, object target, string linkName)
 {
     args.Should().NotBeNull();
     args.Link.AssociationLinkUrl.Should().Be(associationLinkUrl);
     args.Source.Should().BeSameAs(source);
     args.Target.Should().BeSameAs(target);
     args.Link.Name.Should().Be(linkName);
 }