-
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 #74 from LBHackney-IT/feature/TS-1401
TS-1401: Add AssignedOfficer to TempAccommodationInfo (and IsTemporaryAccommodation to TenuredAsset)
- Loading branch information
Showing
9 changed files
with
102 additions
and
0 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
28 changes: 28 additions & 0 deletions
28
Hackney.Shared.HousingSearch.Tests/Models/TempAccommodationOfficerTests.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,28 @@ | ||
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 TemporaryAccommodationOfficerTests | ||
{ | ||
private Fixture _fixture = new Fixture(); | ||
|
||
[Fact] | ||
public void DomainTAOfficerHasPropertiesSet() | ||
{ | ||
//arrange | ||
var aQueryableTAOfficer = _fixture.Create<QueryableTempAccommodationOfficer>(); | ||
|
||
//act | ||
var createdDomaninTAOfficer = TempAccommodationOfficer.Create(aQueryableTAOfficer); | ||
|
||
//assert | ||
createdDomaninTAOfficer.FirstName.Should().Be(aQueryableTAOfficer.FirstName); | ||
createdDomaninTAOfficer.LastName.Should().Be(aQueryableTAOfficer.LastName); | ||
createdDomaninTAOfficer.Email.Should().Be(aQueryableTAOfficer.Email); | ||
} | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
Hackney.Shared.HousingSearch.Tests/Models/TenuredAssetTests.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,30 @@ | ||
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 TenuredAssetTests | ||
{ | ||
private Fixture _fixture = new Fixture(); | ||
|
||
[Fact] | ||
public void DomainTenuredAssetHasPropertiesSet() | ||
{ | ||
//arrange | ||
var aQueryableTenuredAsset = _fixture.Create<QueryableTenuredAsset>(); | ||
|
||
//act | ||
var createdDomainTenuredAsset = TenuredAsset.Create(aQueryableTenuredAsset); | ||
|
||
//assert | ||
createdDomainTenuredAsset.FullAddress.Should().Be(aQueryableTenuredAsset.FullAddress); | ||
createdDomainTenuredAsset.Uprn.Should().Be(aQueryableTenuredAsset.Uprn); | ||
createdDomainTenuredAsset.Id.Should().Be(aQueryableTenuredAsset.Id); | ||
createdDomainTenuredAsset.Type.Should().Be(aQueryableTenuredAsset.Type); | ||
createdDomainTenuredAsset.IsTemporaryAccommodation.Should().Be(aQueryableTenuredAsset.IsTemporaryAccommodation); | ||
} | ||
} | ||
} |
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
28 changes: 28 additions & 0 deletions
28
Hackney.Shared.HousingSearch/Domain/Tenure/TempAccommodationOfficer.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,28 @@ | ||
using Hackney.Shared.HousingSearch.Gateways.Models.Tenures; | ||
|
||
namespace Hackney.Shared.HousingSearch.Domain.Tenure | ||
{ | ||
public class TempAccommodationOfficer | ||
{ | ||
public string FirstName { get; set; } | ||
public string LastName { get; set; } | ||
public string Email { get; set; } | ||
|
||
public static TempAccommodationOfficer Create(QueryableTempAccommodationOfficer TempAccommodationOfficer) | ||
{ | ||
return new TempAccommodationOfficer(TempAccommodationOfficer); | ||
} | ||
public TempAccommodationOfficer() | ||
{ | ||
|
||
} | ||
private TempAccommodationOfficer(QueryableTempAccommodationOfficer TAOfficer) | ||
{ | ||
FirstName = TAOfficer?.FirstName; | ||
LastName = TAOfficer?.LastName; | ||
Email = TAOfficer?.Email; | ||
} | ||
} | ||
} | ||
|
||
|
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
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
9 changes: 9 additions & 0 deletions
9
Hackney.Shared.HousingSearch/Gateways/Models/Tenures/QueryableTempAccommodationOfficer.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,9 @@ | ||
namespace Hackney.Shared.HousingSearch.Gateways.Models.Tenures | ||
{ | ||
public class QueryableTempAccommodationOfficer | ||
{ | ||
public string FirstName { get; set; } | ||
public string LastName { get; set; } | ||
public string Email { 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