public void ShouldSetDefaultsOnModel()
        {
            var actual   = new ContentfulNews();
            var expected = new ContentfulNews
            {
                Alerts     = new List <ContentfulAlert>(),
                Body       = string.Empty,
                Categories = new List <string>(),
                Documents  = new List <Asset>(),
                Image      = new Asset {
                    File = new File {
                        Url = string.Empty
                    }, SystemProperties = new SystemProperties {
                        Type = "Asset"
                    }
                },
                Slug        = string.Empty,
                SunriseDate = DateTime.MinValue.ToUniversalTime(),
                SunsetDate  = DateTime.MaxValue.ToUniversalTime(),
                Tags        = new List <string>(),
                Teaser      = string.Empty,
                Title       = string.Empty
            };

            actual.Should().BeEquivalentTo(expected);
        }
Exemplo n.º 2
0
 public NewsContentfulFactoryTest()
 {
     _contentfulNews        = new ContentfulNewsBuilder().Document().Build();
     _videoRepository       = new Mock <IVideoRepository>();
     _documentFactory       = new Mock <IContentfulFactory <Asset, Document> >();
     _alertBuilder          = new Mock <IContentfulFactory <ContentfulAlert, Alert> >();
     _newsContentfulFactory = new NewsContentfulFactory(_videoRepository.Object, _documentFactory.Object, _alertBuilder.Object, _timeProvider.Object);
 }