public void SeasonCoverageMergeTest() { var coverageInfoCI = new SeasonCoverageCI(new SeasonCoverageDTO(RestMessageBuilder.BuildCoverageRecord("max", "min", 4, 1, 1, SR.Urn("season").ToString()))); Assert.IsNotNull(coverageInfoCI); Assert.AreEqual("max", coverageInfoCI.MaxCoverageLevel); Assert.AreEqual("min", coverageInfoCI.MinCoverageLevel); Assert.AreEqual(4, coverageInfoCI.MaxCovered); Assert.AreEqual(1, coverageInfoCI.Played); }
public void OptionalValuesCanBeNull() { var record = RestMessageBuilder.BuildCoverageRecord(null, null, null, int.MinValue, 1, "sr:season:1"); var item = new SeasonCoverage(new SeasonCoverageCI(new SeasonCoverageDTO(record))); record = RestMessageBuilder.BuildCoverageRecord(string.Empty, string.Empty, null, int.MaxValue, 1, "sr:season:1"); item = new SeasonCoverage(new SeasonCoverageCI(new SeasonCoverageDTO(record))); record = RestMessageBuilder.BuildCoverageRecord("test", "test", 0, 0, 1, "sr:season:1"); item = new SeasonCoverage(new SeasonCoverageCI(new SeasonCoverageDTO(record))); record = RestMessageBuilder.BuildCoverageRecord("test", "test", 100, 100, 1, SR.Urn("season").ToString()); item = new SeasonCoverage(new SeasonCoverageCI(new SeasonCoverageDTO(record))); record = RestMessageBuilder.BuildCoverageRecord("test", "test", null, 100, 1, SR.Urn("season").ToString()); item = new SeasonCoverage(new SeasonCoverageCI(new SeasonCoverageDTO(record))); Assert.IsNotNull(item); Assert.AreEqual("test", item.MaxCoverageLevel); Assert.AreEqual("test", item.MinCoverageLevel); Assert.IsNull(item.MaxCovered); Assert.AreEqual(100, item.Played); }