private static Page <BannerContentType> InvokeReadJsonMethodOnConverter(BannerJsonConverter converter) { var actual = converter.ReadJson(new JsonTextReader(new StringReader(json)), typeof(Page <BannerContentType>), "", new Mock <JsonSerializer>().Object) as Page <BannerContentType>; return(actual); }
public void The_Banner_Properties_Are_Set(BannerJsonConverter converter) { var actual = InvokeReadJsonMethodOnConverter(converter); actual.BannerModels.Any().Should().BeTrue(); actual.BannerModels.First().AllowUserToHideTheBanner.Should().BeFalse(); actual.BannerModels.First().ShowOnTheHomepageOnly.Should().BeTrue(); actual.BannerModels.First().Id.Should().NotBeNullOrWhiteSpace(); actual.BannerModels.First().Title.Should().NotBeNullOrWhiteSpace(); actual.BannerModels.First().BackgroundColour.Should().NotBeNullOrWhiteSpace(); actual.BannerModels.First().Content.Any().Should().BeTrue(); }
public void The_Banner_Is_Returned(BannerJsonConverter converter) { var actual = InvokeReadJsonMethodOnConverter(converter); actual.Should().NotBeNull(); }