public void ContentLink_Is_A_Value_Object()
        {
            var link1 = new ContentLink { Link = "a", Text = "a" };
            var link2 = new ContentLink { Link = "a", Text = "a" };

            Assert.That(link1, Is.EqualTo(link2));
        }
Beispiel #2
0
        private void SetNavigation(IEnumerable<ContentLink> links)
        {
            _linksList = new LinkedList<string>(links.Where(l => !string.IsNullOrEmpty(l.Link)).Select(l => l.Link).ToList());
            var current = _linksList.Find(CurrentPage);
            if (current.Next != null)
                NextPage = new ContentLink {Link = current.Next.Value};

            if (current.Previous != null)
                PreviousPage = new ContentLink {Link = current.Previous.Value};
        }
        public void Before_Each_Test()
        {
            _aa1 = new ContentLink {Link = "aa1.htm", Text = "aa1"};
            _aa2 = new ContentLink {Link = "aa2.htm", Text = "aa2"};
            _aa3 = new ContentLink {Link = "aa3.htm", Text = "aa3"};
            _aa4 = new ContentLink {Link = "", Text = "aa4"};
            _aa5 = new ContentLink {Link = "aa5.htm", Text = "aa5"};

            _links = new List<ContentLink> { _aa1, _aa2, _aa3, _aa4, _aa5 };
            _dataPage = new DataPage();
        }