-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #73 from LBHackney-IT/feature/TS-1389-Add-TA-Status
Feature/TS-1389: Add TA booking status
- Loading branch information
Showing
9 changed files
with
120 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 9 additions & 3 deletions
12
Hackney.Shared.HousingSearch.Tests/Hackney.Shared.HousingSearch.Tests.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,22 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>netcoreapp3.1</TargetFramework> | ||
|
||
<TargetFramework>net6.0</TargetFramework> | ||
<IsTestProject>true</IsTestProject> | ||
<IsPackable>false</IsPackable> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="AutoFixture" Version="4.18.1" /> | ||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.5.0" /> | ||
<PackageReference Include="xunit" Version="2.4.0" /> | ||
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.0" /> | ||
<PackageReference Include="coverlet.collector" Version="1.2.0" /> | ||
<PackageReference Include="coverlet.collector" Version="6.0.2" /> | ||
<PackageReference Include="FluentAssertions" Version="6.12.0" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\Hackney.Shared.HousingSearch\Hackney.Shared.HousingSearch.csproj" /> | ||
</ItemGroup> | ||
|
||
</Project> |
26 changes: 26 additions & 0 deletions
26
Hackney.Shared.HousingSearch.Tests/Models/TempAccommodationInfoTests.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
using FluentAssertions; | ||
using Xunit; | ||
using AutoFixture; | ||
using Hackney.Shared.HousingSearch.Gateways.Models.Tenures; | ||
using Hackney.Shared.HousingSearch.Domain.Tenure; | ||
|
||
namespace Hackney.Shared.HousingSearch.Tests | ||
{ | ||
public class TempAccommodationInfoTests | ||
{ | ||
private Fixture _fixture = new Fixture(); | ||
|
||
[Fact] | ||
public void DomainTempAccommodationInfoHasPropertiesSet() | ||
{ | ||
//arrange | ||
var aQueryableTAInfo = _fixture.Create<QueryableTempAccommodationInfo>(); | ||
|
||
//act | ||
var createdDomaninTAInfo = TempAccommodationInfo.Create(aQueryableTAInfo); | ||
|
||
//assert | ||
createdDomaninTAInfo.BookingStatus.Should().Be(aQueryableTAInfo.BookingStatus); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
using FluentAssertions; | ||
using Xunit; | ||
using AutoFixture; | ||
using Hackney.Shared.HousingSearch.Gateways.Models.Tenures; | ||
|
||
namespace Hackney.Shared.HousingSearch.Tests | ||
{ | ||
public class TenureTests | ||
{ | ||
private Fixture _fixture = new Fixture(); | ||
|
||
[Fact] | ||
public void DomainTenureHasPropertiesSet() | ||
{ | ||
//arrange | ||
var aQueryableTenure = _fixture.Create<QueryableTenure>(); | ||
|
||
//act | ||
var createdDomainTenure = aQueryableTenure.Create(); | ||
|
||
//assert | ||
createdDomainTenure.Id.Should().Be(aQueryableTenure.Id); | ||
createdDomainTenure.TenuredAsset.Should().BeEquivalentTo(aQueryableTenure.TenuredAsset); | ||
createdDomainTenure.PaymentReference.Should().BeEquivalentTo(aQueryableTenure.PaymentReference); | ||
createdDomainTenure.HouseholdMembers.Should().BeEquivalentTo(aQueryableTenure.HouseholdMembers); | ||
createdDomainTenure.StartOfTenureDate.Should().BeEquivalentTo(aQueryableTenure.StartOfTenureDate); | ||
createdDomainTenure.EndOfTenureDate.Should().BeEquivalentTo(aQueryableTenure.EndOfTenureDate); | ||
createdDomainTenure.TenureType.Should().BeEquivalentTo(aQueryableTenure.TenureType); | ||
createdDomainTenure.TempAccommodationInfo.Should().BeEquivalentTo(aQueryableTenure.TempAccommodationInfo); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
Hackney.Shared.HousingSearch/Domain/Tenure/TempAccommodationInfo.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
using Hackney.Shared.HousingSearch.Gateways.Models.Tenures; | ||
|
||
namespace Hackney.Shared.HousingSearch.Domain.Tenure | ||
{ | ||
public class TempAccommodationInfo | ||
{ | ||
public string BookingStatus { get; set; } | ||
|
||
public static TempAccommodationInfo Create(QueryableTempAccommodationInfo TempAccommodationInfo) | ||
{ | ||
return new TempAccommodationInfo(TempAccommodationInfo); | ||
} | ||
public TempAccommodationInfo() | ||
{ | ||
|
||
} | ||
private TempAccommodationInfo(QueryableTempAccommodationInfo TempAccommodationInfo) | ||
{ | ||
BookingStatus = TempAccommodationInfo?.BookingStatus; | ||
} | ||
} | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
Hackney.Shared.HousingSearch/Gateways/Models/Tenures/QueryableTempAccommodationInfo.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
namespace Hackney.Shared.HousingSearch.Gateways.Models.Tenures | ||
{ | ||
public class QueryableTempAccommodationInfo | ||
{ | ||
public string BookingStatus { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters