public void set_the_title()
        {
            var subject = new ItemSubject(){
                Title = "first",
                Title2 = "second"
            };

            var target = new SimpleValues<ItemSubject>(subject);

            var map1 = new FeedItem<ItemSubject>();
            map1.Title(x => x.Title);

            var map2 = new FeedItem<ItemSubject>();
            map2.Title(x => x.Title2);

            var item1 = new SyndicationItem();
            map1.As<IFeedItem<ItemSubject>>().ConfigureItem(item1, target);
            item1.Title.Text.ShouldEqual(subject.Title);


            var item2 = new SyndicationItem();
            map2.As<IFeedItem<ItemSubject>>().ConfigureItem(item2, target);
            item2.Title.Text.ShouldEqual(subject.Title2);

        }
Beispiel #2
0
        public void set_the_title()
        {
            var subject = new ItemSubject()
            {
                Title  = "first",
                Title2 = "second"
            };

            var target = new SimpleValues <ItemSubject>(subject);

            var map1 = new FeedItem <ItemSubject>();

            map1.Title(x => x.Title);

            var map2 = new FeedItem <ItemSubject>();

            map2.Title(x => x.Title2);

            var item1 = new SyndicationItem();

            map1.As <IFeedItem <ItemSubject> >().ConfigureItem(item1, target);
            item1.Title.Text.ShouldEqual(subject.Title);


            var item2 = new SyndicationItem();

            map2.As <IFeedItem <ItemSubject> >().ConfigureItem(item2, target);
            item2.Title.Text.ShouldEqual(subject.Title2);
        }
        public void set_the_title_item_title_is_null_so_ignore_it()
        {
            var subject = new ItemSubject()
            {
                Title = null
            };

            var target = new SimpleValues<ItemSubject>(subject);

            var map1 = new FeedItem<ItemSubject>();
            map1.Title(x => x.Title);

            var item1 = new SyndicationItem();
            map1.As<IFeedItem<ItemSubject>>().ConfigureItem(item1, target);
            item1.Title.ShouldBeNull();
        }
Beispiel #4
0
        public void set_the_title_item_title_is_null_so_ignore_it()
        {
            var subject = new ItemSubject()
            {
                Title = null
            };

            var target = new SimpleValues <ItemSubject>(subject);

            var map1 = new FeedItem <ItemSubject>();

            map1.Title(x => x.Title);

            var item1 = new SyndicationItem();

            map1.As <IFeedItem <ItemSubject> >().ConfigureItem(item1, target);
            item1.Title.ShouldBeNull();
        }