@@ -9,50 +9,49 @@ var _ = Describe("Audio", func() {
99 var subject * Audio
1010
1111 BeforeEach (func () {
12- err := fixture ("audio" , & subject )
13- Expect (err ).NotTo (HaveOccurred ())
12+ Expect (fixture ("audio" , & subject )).To (Succeed ())
1413 })
1514
1615 It ("should parse correctly" , func () {
1716 Expect (subject ).To (Equal (& Audio {
18- Mimes : []string {
17+ MIMEs : []string {
1918 "audio/mp4" ,
2019 },
21- MinDuration : 5 ,
22- MaxDuration : 30 ,
23- Protocols : [] int { AudioProtocolDAAST1 , AudioProtocolDAAST1Wrapper },
24- Sequence : 1 ,
25- BAttr : [] int {CreativeAttributeUserInitiated , CreativeAttributeWindowsDialogOrAlert },
26- MaxExtended : 30 ,
27- MinBitrate : 300 ,
28- MaxBitrate : 1500 ,
29- Delivery : [] int {ContentDeliveryProgressive },
30- CompanionAd : []Banner {
31- {W : 300 , H : 250 , ID : "1234567893-1" , Pos : AdPosAboveFold , BAttr : []int {CreativeAttributeUserInitiated , CreativeAttributeWindowsDialogOrAlert }, ExpDir : []int {ExpDirRight , ExpDirDown }},
32- {W : 728 , H : 90 , ID : "1234567893-2" , Pos : AdPosAboveFold , BAttr : []int {CreativeAttributeUserInitiated , CreativeAttributeWindowsDialogOrAlert }},
20+ MinDuration : 5 ,
21+ MaxDuration : 30 ,
22+ Protocols : [] Protocol { ProtocolDAAST1 , ProtocolDAAST1Wrapper },
23+ Sequence : 1 ,
24+ BlockedAttrs : [] CreativeAttribute {CreativeAttributeUserInitiated , CreativeAttributeWindowsDialogOrAlert },
25+ MaxExtended : 30 ,
26+ MinBitrate : 300 ,
27+ MaxBitrate : 1500 ,
28+ Delivery : [] ContentDelivery {ContentDeliveryProgressive },
29+ CompanionAds : []Banner {
30+ {Width : 300 , Height : 250 , ID : "1234567893-1" , Position : AdPositionAboveFold , BlockedAttrs : []CreativeAttribute {CreativeAttributeUserInitiated , CreativeAttributeWindowsDialogOrAlert }, ExpDirs : []ExpDir {ExpDirRight , ExpDirDown }},
31+ {Width : 728 , Height : 90 , ID : "1234567893-2" , Position : AdPositionAboveFold , BlockedAttrs : []CreativeAttribute {CreativeAttributeUserInitiated , CreativeAttributeWindowsDialogOrAlert }},
3332 },
34- API : []int {APIFrameworkVPAID1 , APIFrameworkVPAID2 },
35- CompanionType : []int { VASTCompanionStatic , VASTCompanionHTML },
33+ APIs : []APIFramework {APIFrameworkVPAID1 , APIFrameworkVPAID2 },
34+ CompanionTypes : []CompanionType { CompanionTypeStatic , CompanionTypeHTML },
3635 }))
3736 })
3837
3938 It ("should validate" , func () {
4039 Expect ((& Audio {
41- MinDuration : 5 ,
42- MaxDuration : 30 ,
43- Protocols : [] int { AudioProtocolDAAST1 , AudioProtocolDAAST1Wrapper },
44- Sequence : 1 ,
45- BAttr : [] int {CreativeAttributeUserInitiated , CreativeAttributeWindowsDialogOrAlert },
46- MaxExtended : 30 ,
47- MinBitrate : 300 ,
48- MaxBitrate : 1500 ,
49- Delivery : [] int {ContentDeliveryProgressive },
50- CompanionAd : []Banner {
51- {W : 300 , H : 250 , ID : "1234567893-1" , Pos : AdPosAboveFold , BAttr : []int {CreativeAttributeUserInitiated , CreativeAttributeWindowsDialogOrAlert }, ExpDir : []int {ExpDirRight , ExpDirDown }},
52- {W : 728 , H : 90 , ID : "1234567893-2" , Pos : AdPosAboveFold , BAttr : []int {CreativeAttributeUserInitiated , CreativeAttributeWindowsDialogOrAlert }},
40+ MinDuration : 5 ,
41+ MaxDuration : 30 ,
42+ Protocols : [] Protocol { ProtocolDAAST1 , ProtocolDAAST1Wrapper },
43+ Sequence : 1 ,
44+ BlockedAttrs : [] CreativeAttribute {CreativeAttributeUserInitiated , CreativeAttributeWindowsDialogOrAlert },
45+ MaxExtended : 30 ,
46+ MinBitrate : 300 ,
47+ MaxBitrate : 1500 ,
48+ Delivery : [] ContentDelivery {ContentDeliveryProgressive },
49+ CompanionAds : []Banner {
50+ {Width : 300 , Height : 250 , ID : "1234567893-1" , Position : AdPositionAboveFold , BlockedAttrs : []CreativeAttribute {CreativeAttributeUserInitiated , CreativeAttributeWindowsDialogOrAlert }, ExpDirs : []ExpDir {ExpDirRight , ExpDirDown }},
51+ {Width : 728 , Height : 90 , ID : "1234567893-2" , Position : AdPositionAboveFold , BlockedAttrs : []CreativeAttribute {CreativeAttributeUserInitiated , CreativeAttributeWindowsDialogOrAlert }},
5352 },
54- CompanionType : []int { VASTCompanionStatic , VASTCompanionHTML },
55- }).Validate ()).To (Equal (ErrInvalidAudioNoMimes ))
53+ CompanionTypes : []CompanionType { CompanionTypeStatic , CompanionTypeHTML },
54+ }).Validate ()).To (Equal (ErrInvalidAudioNoMIMEs ))
5655 })
5756
5857})
0 commit comments