Skip to content

Commit 42003f7

Browse files
Merge pull request #127 from StuartFerguson/task/#125_getmerchantcontract
Add Operator Name to contract response
2 parents baa88a5 + 17fb7a1 commit 42003f7

3 files changed

Lines changed: 10 additions & 0 deletions

File tree

EstateManagement.DataTransferObjects/Responses/ContractResponse.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,14 @@ public class ContractResponse
3838
/// </value>
3939
public Guid OperatorId { get; set; }
4040

41+
/// <summary>
42+
/// Gets or sets the name of the operator.
43+
/// </summary>
44+
/// <value>
45+
/// The name of the operator.
46+
/// </value>
47+
public String OperatorName { get; set; }
48+
4149
/// <summary>
4250
/// Gets or sets the products.
4351
/// </summary>

EstateManagement.Tests/Factories/ModelFactoryTests.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -398,6 +398,7 @@ public void ModelFactory_Contract_ContractOnly_IsConverted()
398398
contractResponse.ShouldNotBeNull();
399399
contractResponse.EstateId.ShouldBe(contractModel.EstateId);
400400
contractResponse.OperatorId.ShouldBe(contractModel.OperatorId);
401+
contractResponse.OperatorName.ShouldBe(contractModel.OperatorName);
401402
contractResponse.ContractId.ShouldBe(contractModel.ContractId);
402403
contractResponse.Description.ShouldBe(contractModel.Description);
403404
contractResponse.Products.ShouldBeNull();

EstateManagement/Factories/ModelFactory.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ public ContractResponse ConvertFrom(Contract contract)
4343
ContractId = contract.ContractId,
4444
EstateId = contract.EstateId,
4545
OperatorId = contract.OperatorId,
46+
OperatorName = contract.OperatorName,
4647
Description = contract.Description
4748
};
4849

0 commit comments

Comments
 (0)