public void SeasonCoverageInfoDTOTest() { var msg = RMF.GetSeasonCoverageInfo(); var dto = new SeasonCoverageDTO(msg); ValidateSeasonCoverageInfo(msg, dto); }
private static void ValidateSeasonCoverageInfo(seasonCoverageInfo msg, SeasonCoverageDTO dto) { Assert.AreEqual(msg.max_coverage_level, dto.MaxCoverageLevel); Assert.AreEqual(msg.max_covered, dto.MaxCovered); Assert.AreEqual(msg.min_coverage_level, dto.MinCoverageLevel); Assert.AreEqual(msg.played, dto.Played); Assert.AreEqual(msg.scheduled, dto.Scheduled); }
/// <summary> /// Initializes a new instance of the <see cref="SeasonCoverageCI" /> class. /// </summary> /// <param name="coverageDTO">A <see cref="SeasonCoverageDTO" /> instance containing information about the coverage</param> public SeasonCoverageCI(SeasonCoverageDTO coverageDTO) { Contract.Requires(coverageDTO != null); MaxCoverageLevel = coverageDTO.MaxCoverageLevel; MinCoverageLevel = coverageDTO.MinCoverageLevel; MaxCovered = coverageDTO.MaxCovered; Played = coverageDTO.Played; Scheduled = coverageDTO.Scheduled; SeasonId = coverageDTO.SeasonId; }
/// <summary> /// Initializes a new instance of the <see cref="SeasonCoverageCI"/> class. /// </summary> /// <param name="coverageDTO">A <see cref="SeasonCoverageDTO"/> instance containing information about the coverage</param> public SeasonCoverageCI(SeasonCoverageDTO coverageDTO) { Guard.Argument(coverageDTO, nameof(coverageDTO)).NotNull(); MaxCoverageLevel = coverageDTO.MaxCoverageLevel; MinCoverageLevel = coverageDTO.MinCoverageLevel; MaxCovered = coverageDTO.MaxCovered; Played = coverageDTO.Played; Scheduled = coverageDTO.Scheduled; SeasonId = coverageDTO.SeasonId; }