Skip to content

Commit 009a554

Browse files
authored
Add IsUnderWarranty (#52)
1 parent 3cbc3cb commit 009a554

File tree

8 files changed

+12
-5
lines changed

8 files changed

+12
-5
lines changed

Hackney.Shared.Asset.Tests/Factories/EntityFactoryTest.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ public void AssetCharacteristicsMapsFromDatabaseToDomain()
156156
domainAC.IsStepFree.Should().Be(databaseAC.IsStepFree);
157157
domainAC.BathroomNotes.Should().Be(databaseAC.BathroomNotes);
158158
domainAC.LivingRoomNotes.Should().Be(databaseAC.LivingRoomNotes);
159+
domainAC.IsUnderWarranty.Should().Be(databaseAC.IsUnderWarranty);
159160
}
160161

161162
[Fact]
@@ -205,6 +206,7 @@ public void AssetCharacteristicsMapsFromDomainToDatabase()
205206
databaseAC.IsStepFree.Should().Be(domainAC.IsStepFree);
206207
databaseAC.BathroomNotes.Should().Be(domainAC.BathroomNotes);
207208
databaseAC.LivingRoomNotes.Should().Be(domainAC.LivingRoomNotes);
209+
databaseAC.IsUnderWarranty.Should().Be(domainAC.IsUnderWarranty);
208210
}
209211

210212
[Fact]

Hackney.Shared.Asset.Tests/Factories/ResponseFactoryTest.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ public void AssetCharacteristicsMapsFromDomainToDatabase()
9494
presentationAC.IsStepFree.Should().Be(domainAC.IsStepFree);
9595
presentationAC.BathroomNotes.Should().Be(domainAC.BathroomNotes);
9696
presentationAC.LivingRoomNotes.Should().Be(domainAC.LivingRoomNotes);
97+
presentationAC.IsUnderWarranty.Should().Be(domainAC.IsUnderWarranty);
9798
}
9899

99100
[Fact]

Hackney.Shared.Asset/Boundary/Response/AssetCharasteristicsResponse.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,6 @@ public class AssetCharacteristicsResponse
4141
public bool? IsStepFree { get; set; }
4242
public string BathroomNotes { get; set; }
4343
public string LivingRoomNotes { get; set; }
44+
public bool? IsUnderWarranty { get; set; }
4445
}
4546
}

Hackney.Shared.Asset/Domain/Asset.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
using System;
2-
using System.Collections.Generic;
32

43
namespace Hackney.Shared.Asset.Domain
54
{
@@ -13,7 +12,6 @@ public class Asset
1312
public RentGroup? RentGroup { get; set; }
1413
public string RootAsset { get; set; }
1514
public string ParentAssetIds { get; set; }
16-
1715
public string BoilerHouseId { get; set; }
1816
public bool IsActive { get; set; }
1917
public AssetLocation AssetLocation { get; set; }

Hackney.Shared.Asset/Domain/AssetCharacteristics.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,6 @@ public class AssetCharacteristics
4141
public bool? IsStepFree { get; set; }
4242
public string BathroomNotes { get; set; }
4343
public string LivingRoomNotes { get; set; }
44+
public bool? IsUnderWarranty { get; set; }
4445
}
4546
}

Hackney.Shared.Asset/Factories/EntityFactory.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,8 @@ public static AssetCharacteristics ToDomain(this AssetCharacteristicsDb database
101101
KitchenNotes = databaseEntity.KitchenNotes,
102102
IsStepFree = databaseEntity.IsStepFree,
103103
BathroomNotes = databaseEntity.BathroomNotes,
104-
LivingRoomNotes = databaseEntity.LivingRoomNotes
104+
LivingRoomNotes = databaseEntity.LivingRoomNotes,
105+
IsUnderWarranty = databaseEntity.IsUnderWarranty
105106
};
106107
}
107108

@@ -147,7 +148,8 @@ public static AssetCharacteristicsDb ToDatabase(this AssetCharacteristics domain
147148
KitchenNotes = domainEntity.KitchenNotes,
148149
IsStepFree = domainEntity.IsStepFree,
149150
BathroomNotes = domainEntity.BathroomNotes,
150-
LivingRoomNotes = domainEntity.LivingRoomNotes
151+
LivingRoomNotes = domainEntity.LivingRoomNotes,
152+
IsUnderWarranty = domainEntity.IsUnderWarranty
151153
};
152154
}
153155
#endregion

Hackney.Shared.Asset/Factories/ResponseFactory.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,8 @@ public static AssetCharacteristicsResponse ToResponse(this AssetCharacteristics
7474
KitchenNotes = domainEntity.KitchenNotes,
7575
IsStepFree = domainEntity.IsStepFree,
7676
BathroomNotes = domainEntity.BathroomNotes,
77-
LivingRoomNotes = domainEntity.LivingRoomNotes
77+
LivingRoomNotes = domainEntity.LivingRoomNotes,
78+
IsUnderWarranty = domainEntity.IsUnderWarranty
7879
};
7980
}
8081

Hackney.Shared.Asset/Infrastructure/AssetCharacteristicsDb.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,6 @@ public class AssetCharacteristicsDb
4141
public bool? IsStepFree { get; set; }
4242
public string BathroomNotes { get; set; }
4343
public string LivingRoomNotes { get; set; }
44+
public bool? IsUnderWarranty { get; set; }
4445
}
4546
}

0 commit comments

Comments
 (0)