@@ -200,6 +200,37 @@ public void ModelFactory_ConvertFrom_ContractResponses_IsConverted()
200200 Value = 1.23m
201201 }
202202 }
203+ } ,
204+ new Models . ContractProduct
205+ {
206+ DisplayText = "Display 2" ,
207+ Name = "Product 2" ,
208+ ProductId = Guid . NewGuid ( ) ,
209+ ProductReportingId = 5 ,
210+ Value = 23.45m ,
211+ ProductType = Models . ProductType . MobileTopup ,
212+ TransactionFees = new List < Models . ContractProductTransactionFee >
213+ {
214+ new Models . ContractProductTransactionFee
215+ {
216+ CalculationType = Models . CalculationType . Percentage ,
217+ FeeType = Models . FeeType . ServiceProvider ,
218+ Description = "Fee 2" ,
219+ TransactionFeeId = Guid . NewGuid ( ) ,
220+ TransactionFeeReportingId = 6 ,
221+ Value = 2.34m
222+ }
223+ }
224+ } ,
225+ new Models . ContractProduct
226+ {
227+ DisplayText = "Display 3" ,
228+ Name = "Product 3" ,
229+ ProductId = Guid . NewGuid ( ) ,
230+ ProductReportingId = 7 ,
231+ Value = 34.56m ,
232+ ProductType = Models . ProductType . Voucher ,
233+ TransactionFees = new List < Models . ContractProductTransactionFee > ( )
203234 }
204235 }
205236 }
@@ -216,7 +247,7 @@ public void ModelFactory_ConvertFrom_ContractResponses_IsConverted()
216247 dto [ 0 ] . EstateReportingId . ShouldBe ( 2 ) ;
217248 dto [ 0 ] . OperatorId . ShouldBe ( operatorId ) ;
218249 dto [ 0 ] . OperatorName . ShouldBe ( "Operator 1" ) ;
219- dto [ 0 ] . Products . Count . ShouldBe ( 1 ) ;
250+ dto [ 0 ] . Products . Count . ShouldBe ( 3 ) ;
220251 dto [ 0 ] . Products [ 0 ] . DisplayText . ShouldBe ( "Display" ) ;
221252 dto [ 0 ] . Products [ 0 ] . Name . ShouldBe ( "Product" ) ;
222253 dto [ 0 ] . Products [ 0 ] . ProductId . ShouldBe ( productId ) ;
@@ -230,6 +261,11 @@ public void ModelFactory_ConvertFrom_ContractResponses_IsConverted()
230261 dto [ 0 ] . Products [ 0 ] . TransactionFees [ 0 ] . TransactionFeeId . ShouldBe ( transactionFeeId ) ;
231262 dto [ 0 ] . Products [ 0 ] . TransactionFees [ 0 ] . TransactionFeeReportingId . ShouldBe ( 4 ) ;
232263 dto [ 0 ] . Products [ 0 ] . TransactionFees [ 0 ] . Value . ShouldBe ( 1.23m ) ;
264+ dto [ 0 ] . Products [ 1 ] . ProductType . ShouldBe ( ProductType . MobileTopup ) ;
265+ dto [ 0 ] . Products [ 1 ] . TransactionFees [ 0 ] . CalculationType . ShouldBe ( CalculationType . Percentage ) ;
266+ dto [ 0 ] . Products [ 1 ] . TransactionFees [ 0 ] . FeeType . ShouldBe ( FeeType . ServiceProvider ) ;
267+ dto [ 0 ] . Products [ 2 ] . ProductType . ShouldBe ( ProductType . Voucher ) ;
268+ dto [ 0 ] . Products [ 2 ] . TransactionFees . ShouldBeEmpty ( ) ;
233269 }
234270
235271 [ Fact ]
0 commit comments