public void AddCompetitorToAdvertiserIdentifier(
    ProductExternalReference productExternalRefrence,
    string clashCode)
 {
     AddCompetitorToExclusivityCode(
         AllProductIdsInClashOrAdvertiserCode,
         productExternalRefrence,
         clashCode);
 }
Beispiel #2
0
 protected RemovedSpotFromBreakEventArgs(
     BreakExternalReference breakExternalReference,
     string advertiserIdentifier,
     string clashExternalReference,
     ProductExternalReference productExternalReference,
     bool isSponsor,
     SponsorshipApplicability applicability,
     SponsorshipCalculationType calculationType,
     (SponsorshipRestrictionType type, Duration duration) restrictionType
 /// <summary>
 /// Construct an event argument object for when a spot is added to a break.
 /// </summary>
 /// <param name="productExternalReference">   </param>
 /// <param name="isSponsor">                  </param>
 /// <param name="productAdvertiserIdentifier"></param>
 /// <param name="productClashCode">           </param>
 /// <param name="competitorType">             </param>
 /// <param name="sponsorshipApplicability">
 /// Will be <see langword="null"/> if the spot is for a sponsor.
 /// </param>
 /// <param name="restrictionType">            </param>
 protected AddedSpotToBreakEventArgs(
     BreakExternalReference breakExternalReference,
     ProductExternalReference productExternalReference,
     bool isSponsor,
     string productAdvertiserIdentifier,
     string productClashCode,
     SponsorshipCompetitorType competitorType,
     SponsorshipApplicability sponsorshipApplicability,
     SponsorshipCalculationType calculationType,
     (SponsorshipRestrictionType type, Duration duration) restrictionType)
Beispiel #4
0
        public void AssignmentIsNewInstance(string value)
        {
            // Arrange

            // Act
            ProductExternalReference subject = value;

            // Assert
            _ = subject.Should().NotBeSameAs(value, becauseArgs: null);
        }
 public void RemoveSponsoredProductToSpotByCount(
     ProductExternalReference productExternalRefrence,
     int count)
 {
     RemoveProductToSpot(
         SponsoredProducts,
         productExternalRefrence,
         count
         );
 }
 public void RemoveSponsoredProductToSpotByDuration(
     ProductExternalReference productExternalRefrence,
     Duration duration)
 {
     RemoveProductToSpot(
         SponsoredProducts,
         productExternalRefrence,
         duration.TotalSeconds
         );
 }
 public void RemoveCompetitorToSpotByDuration(
     ProductExternalReference productExternalRefrence,
     Duration duration)
 {
     RemoveProductToSpot(
         AlreadyPlacedCompetitors,
         productExternalRefrence,
         duration.TotalSeconds
         );
 }
 public void RemoveCompetitorToSpotByCount(
     ProductExternalReference productExternalRefrence,
     int count)
 {
     RemoveProductToSpot(
         AlreadyPlacedCompetitors,
         productExternalRefrence,
         count
         );
 }
 public void AddSponsoredProductToSpotByCount(
     ProductExternalReference productExternalRefrence,
     int count)
 {
     AddProductToSpot(
         SponsoredProducts,
         productExternalRefrence,
         count
         );
 }
Beispiel #10
0
        public void AssigningAValue(string value)
        {
            // Arrange

            // Act
            ProductExternalReference result = value;

            // Assert
            _ = value.Should().BeEquivalentTo(result, becauseArgs: null);
        }
Beispiel #11
0
        public void StringToProductExternalReferenceInequalityOperator(string value)
        {
            // Arrange
            ProductExternalReference subject = value;

            // Act
            bool result = subject != "Badger";

            // Assert
            _ = result.Should().BeTrue(becauseArgs: null);
        }
Beispiel #12
0
        public void StringToProductExternalReferenceEquality(string value)
        {
            // Arrange
            ProductExternalReference subject = value;

            // Act
            bool result = value.Equals(subject);

            // Assert
            _ = result.Should().BeTrue(becauseArgs: null);
        }
Beispiel #13
0
        public void AssigningToAString(string value)
        {
            // Arrange
            ProductExternalReference subject = value;

            // Act
            string result = subject;

            // Assert
            _ = value.Should().BeEquivalentTo(result, becauseArgs: null);
        }
Beispiel #14
0
        public void Appending(string value)
        {
            // Arrange
            ProductExternalReference subject         = value;
            ProductExternalReference subjectAppended = subject + value;

            // Act
            bool result = subjectAppended == subject + value;

            // Assert
            _ = result.Should().BeTrue(becauseArgs: null);
        }
Beispiel #15
0
 public RemovedSponsoredSpotCountFromBreakEventArgs(
     BreakExternalReference breakExternalReference,
     ProductExternalReference productExternalReference,
     SponsorshipApplicability applicability,
     SponsorshipCalculationType calculationType)
     : base(
         breakExternalReference,
         advertiserIdentifier: string.Empty,
         clashExternalReference: string.Empty,
         productExternalReference,
         true,
         applicability,
         calculationType,
         (SponsorshipRestrictionType.SpotCount, Duration.Zero)
Beispiel #16
0
        public void ProductExternalReferenceToStringAsObjectEquality(
            string left,
            string right
            )
        {
            // Arrange
            ProductExternalReference subjectLeft = left;
            object subjectRight = right;

            // Act
            bool result = subjectLeft.Equals(subjectRight);

            // Assert
            _ = result.Should().BeTrue(becauseArgs: null);
        }
 public AddedSponsoredSpotCountToBreakEventArgs(
     BreakExternalReference breakExternalReference,
     ProductExternalReference productExternalReference,
     SponsorshipApplicability applicability,
     SponsorshipCalculationType calculationType)
     : base(
         breakExternalReference,
         productExternalReference,
         isSponsor: true,
         productAdvertiserIdentifier: string.Empty,
         productClashCode: string.Empty,
         competitorType: SponsorshipCompetitorType.Neither,
         applicability,
         calculationType,
         (SponsorshipRestrictionType.SpotCount, Duration.Zero)
 public RemovedCompetitorSpotCountFromBreakEventArgs(
     BreakExternalReference breakExternalReference,
     string advertiserIdentifier,
     string clashExternalReference,
     ProductExternalReference productExternalReference,
     SponsorshipApplicability applicability,
     SponsorshipCalculationType calculationType)
     : base(
         breakExternalReference,
         advertiserIdentifier,
         clashExternalReference,
         productExternalReference,
         false,
         applicability,
         calculationType,
         (SponsorshipRestrictionType.SpotCount, Duration.Zero)
Beispiel #19
0
 public AddedCompetitorSpotCountToBreakEventArgs(
     BreakExternalReference breakExternalReference,
     ProductExternalReference productExternalReference,
     string productAdvertiserIdentifier,
     string productClashCode,
     SponsorshipCompetitorType competitorType,
     SponsorshipApplicability sponsorshipApplicability,
     SponsorshipCalculationType calculationType)
     : base(
         breakExternalReference,
         productExternalReference,
         isSponsor: false,
         productAdvertiserIdentifier,
         productClashCode,
         competitorType,
         sponsorshipApplicability,
         calculationType,
         (SponsorshipRestrictionType.SpotCount, Duration.Zero))