Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scaffold #204

Open
wants to merge 90 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
90 commits
Select commit Hold shift + click to select a range
63df019
PSP-9471 fix
stairaku Dec 23, 2024
7c580e6
PSP-9471 unit test
stairaku Dec 23, 2024
eef09b5
updates
stairaku Dec 24, 2024
1f6c9bf
Merge branch 'PSP-9471' of https://github.com/stairaku/PSP into PSP-9471
stairaku Dec 24, 2024
18d9c21
update unit tests
stairaku Dec 24, 2024
914c15e
Merge branch 'dev' into PSP-9471
stairaku Dec 24, 2024
738a3c1
Add alter ups to change the name of the PIMS_ROLEs for lease/license …
devinleighsmith Dec 24, 2024
439c27f
CI: Bump version to v5.7.0-96.7
github-actions[bot] Dec 24, 2024
24572ab
Deleting unneccesary imports
stairaku Dec 24, 2024
991b36d
Deleting unneccesary imports
stairaku Dec 24, 2024
acb5b41
Merge branch 'PSP-9471' of https://github.com/stairaku/PSP into PSP-9471
stairaku Dec 24, 2024
7f3641e
Merge branch 'dev' into PSP-9471
stairaku Dec 24, 2024
0f8b808
PSP-9743 Generate green button in the Expropriation tab for Form 1,5 …
asanchezr Dec 24, 2024
7bf12a9
CI: Bump version to v5.7.0-96.8
github-actions[bot] Dec 24, 2024
4a5b20b
PSP-9570 Property Information leaflet should open up when a property …
asanchezr Dec 24, 2024
77c659a
CI: Bump version to v5.7.0-96.9
github-actions[bot] Dec 24, 2024
89ca6cd
PSP-9513 : Change document workflow - support asynchronous upload (#4…
eddherrera Dec 25, 2024
26d1ff5
CI: Bump version to v5.7.0-96.10
github-actions[bot] Dec 25, 2024
dfc2b6a
Psp 9512 jobs for upload, polling, retries (#4529)
devinleighsmith Dec 26, 2024
b71844e
CI: Bump version to v5.7.0-96.11
github-actions[bot] Dec 26, 2024
a51985c
Merge branch 'bcgov:dev' into PSP-9471
stairaku Dec 27, 2024
799ada0
Adding logic on organizations to cover changes on status field
stairaku Dec 27, 2024
e06fc4c
Merge branch 'PSP-9471' of https://github.com/stairaku/PSP into PSP-9471
stairaku Dec 27, 2024
fefd57c
correct error when filtering by file #. (#4557)
devinleighsmith Dec 30, 2024
94fedbc
CI: Bump version to v5.7.0-96.12
github-actions[bot] Dec 30, 2024
98b50db
remove retired check from research files. (#4556)
devinleighsmith Dec 30, 2024
79d7389
CI: Bump version to v5.7.0-96.13
github-actions[bot] Dec 30, 2024
5c73dcc
PSP-9572 : Acquisition- Aggregating and Displaying Final H-120 CompeN…
eddherrera Dec 30, 2024
11bb53f
CI: Bump version to v5.7.0-96.14
github-actions[bot] Dec 30, 2024
c3a630e
psp-9256 allow users added to a project to view an acquisition file. …
devinleighsmith Dec 30, 2024
ae14501
CI: Bump version to v5.7.0-96.15
github-actions[bot] Dec 30, 2024
5bc754c
Address race condition where: (see comment) (#4559)
devinleighsmith Dec 30, 2024
d6c46e4
CI: Bump version to v5.7.0-96.16
github-actions[bot] Dec 30, 2024
c262323
PSP-9604 : Acquisition file- Progress statuses (#4554)
eddherrera Dec 30, 2024
a084d97
CI: Bump version to v5.7.0-96.17
github-actions[bot] Dec 30, 2024
350ae84
Merge branch 'bcgov:dev' into PSP-9471
stairaku Dec 30, 2024
c49de85
changes on organization and person status logic
stairaku Dec 30, 2024
b5b7326
Merge branch 'PSP-9471' of https://github.com/stairaku/PSP into PSP-9471
stairaku Dec 30, 2024
ce0c73f
Changes on contact models to convert isDisabled to string from Api to…
stairaku Dec 30, 2024
6da46e7
Changes on contact models to convert isDisabled to string from Api to…
stairaku Dec 30, 2024
102f2f4
Merge pull request #4552 from stairaku/PSP-9471
stairaku Dec 30, 2024
31b1e80
CI: Bump version to v5.7.0-96.18
github-actions[bot] Dec 30, 2024
80f9198
Psp 9763 - infinite render loop (#4561)
devinleighsmith Dec 31, 2024
7befa80
CI: Bump version to v5.7.0-96.19
github-actions[bot] Dec 31, 2024
5bf92e9
Psp 9512 - corrections/enhancements (#4562)
devinleighsmith Dec 31, 2024
2981f65
CI: Bump version to v5.7.0-96.20
github-actions[bot] Dec 31, 2024
1bc3755
PSP-9760 : FT:Projects: User is not able to update any of the project…
eddherrera Dec 31, 2024
ba2043b
CI: Bump version to v5.7.0-96.21
github-actions[bot] Dec 31, 2024
916a176
PSP-9683 Generated H-120 Compensation Requisition not Populating Elec…
asanchezr Jan 2, 2025
b0e44af
CI: Bump version to v5.7.0-96.22
github-actions[bot] Jan 2, 2025
c76126a
Merge pull request #4565 from bcgov/dev
JamesPayer Jan 2, 2025
5e1cbb6
Alter Down Repaired
dfilteau Jan 2, 2025
2b2a1e8
Bump DEV version - IS97 (#4566)
asanchezr Jan 3, 2025
f890f5a
CI: Bump version to v5.8.0-97.1
github-actions[bot] Jan 3, 2025
550c0f2
Merge branch 'test' into Test
asanchezr Jan 3, 2025
4b3ba08
Merge pull request #4567 from dfilteau/Test
asanchezr Jan 3, 2025
a152527
Merge remote-tracking branch 'upstream/test' into backmerge_test_to_dev
asanchezr Jan 3, 2025
d4eae4b
PSP-9416 Prevent deletion of properties that have been subdivided or …
asanchezr Jan 3, 2025
491e67a
CI: Bump version to v5.8.0-97.2
github-actions[bot] Jan 3, 2025
e36c413
PSP-8351 fix (#4573)
stairaku Jan 7, 2025
b50f9f2
CI: Bump version to v5.8.0-97.3
github-actions[bot] Jan 7, 2025
8218471
PSP-9678 fix (#4574)
stairaku Jan 7, 2025
1b1e978
CI: Bump version to v5.8.0-97.4
github-actions[bot] Jan 7, 2025
e285a32
PSP-9772 fix (#4575)
stairaku Jan 7, 2025
3278b96
CI: Bump version to v5.8.0-97.5
github-actions[bot] Jan 7, 2025
00f1ba7
Merge branch 'dev' into backmerge_test_to_dev
asanchezr Jan 7, 2025
f0f1f01
PSP-9799 Fix faulty logic when formatting project name and descriptio…
asanchezr Jan 7, 2025
aeb842c
CI: Bump version to v5.8.0-97.6
github-actions[bot] Jan 7, 2025
8978d21
Merge branch 'dev' into backmerge_test_to_dev
asanchezr Jan 7, 2025
2ab20d3
PSP-9427 : Acquisition files- Advanced Payment served date field to b…
eddherrera Jan 7, 2025
914e526
CI: Bump version to v5.8.0-97.7
github-actions[bot] Jan 7, 2025
4c6d664
Psp 5703 - document repository unit tests. (#4568)
devinleighsmith Jan 7, 2025
d0572d3
CI: Bump version to v5.8.0-97.8
github-actions[bot] Jan 7, 2025
4ced4ae
Psp 9256 tests (#4560)
devinleighsmith Jan 7, 2025
7afb36a
CI: Bump version to v5.8.0-97.9
github-actions[bot] Jan 7, 2025
26078d4
PSP-8147 UI/UX Property Activity Pane – Activity Details Section: Fie…
asanchezr Jan 7, 2025
952872d
CI: Bump version to v5.8.0-97.10
github-actions[bot] Jan 7, 2025
1c9fc50
Merge branch 'dev' into backmerge_test_to_dev
asanchezr Jan 7, 2025
e741439
Merge pull request #4569 from asanchezr/backmerge_test_to_dev
asanchezr Jan 7, 2025
27606b2
CI: Bump version to v5.8.0-97.11
github-actions[bot] Jan 7, 2025
ce0653a
PSP-9784: IS97 Update automated test suite (#4580)
stairaku Jan 8, 2025
7f96ecb
CI: Bump version to v5.8.0-97.12
github-actions[bot] Jan 8, 2025
68b3060
PSP-9806 fix (#4581)
stairaku Jan 8, 2025
1cf4984
CI: Bump version to v5.8.0-97.13
github-actions[bot] Jan 9, 2025
528fe34
PSP-9785 Prevent deletion of properties that have been subdivided or …
asanchezr Jan 9, 2025
e4d1bfb
CI: Bump version to v5.8.0-97.14
github-actions[bot] Jan 9, 2025
2622655
IS-97.00 Database Schema (#4582)
dfilteau Jan 9, 2025
b519ff7
scaffold - note - comp reqs are broken until psp-9066 is implemented.
Jan 9, 2025
21ad9dc
comment out tests related to scaffold.
Jan 9, 2025
8eae71e
scaffold WIP
Jan 13, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
31 changes: 31 additions & 0 deletions source/backend/Pims.Scheduler.Test/Pims.Scheduler.Test.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>

<IsPackable>false</IsPackable>
<IsTestProject>true</IsTestProject>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="FluentAssertions" Version="6.10.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.0" />
<PackageReference Include="Moq" Version="4.20.70" />
<PackageReference Include="xunit" Version="2.4.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="6.0.0">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\scheduler\Pims.Scheduler.csproj" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
using FluentAssertions;
using Moq;
using Pims.Api.Models.CodeTypes;
using Pims.Api.Models.Concepts.Document;
using Pims.Api.Models.Requests.Http;
using Pims.Dal.Entities.Models;
using Pims.Scheduler.Repositories;
using Xunit;

namespace Pims.Scheduler.Test.Repositories
{
public class PimsDocumentQueueRepositoryTest
{
[Fact]
public async Task PollQueuedDocument_ValidDocument_ReturnsExternalResponse()
{
// Arrange
var document = new DocumentQueueModel { Id = 1 };
var expectedResponse = new ExternalResponse<DocumentQueueModel> { Status = ExternalResponseStatus.Success };
var repositoryMock = new Mock<IPimsDocumentQueueRepository>();
repositoryMock.Setup(x => x.PollQueuedDocument(document)).ReturnsAsync(expectedResponse);

// Act
var result = await repositoryMock.Object.PollQueuedDocument(document);

// Assert
result.Should().NotBeNull();
result.Status.Should().Be(ExternalResponseStatus.Success);
repositoryMock.Verify(x => x.PollQueuedDocument(document), Times.Once);
}

[Fact]
public async Task UploadQueuedDocument_ValidDocument_ReturnsExternalResponse()
{
// Arrange
var document = new DocumentQueueModel { Id = 1 };
var expectedResponse = new ExternalResponse<DocumentQueueModel> { Status = ExternalResponseStatus.Success };
var repositoryMock = new Mock<IPimsDocumentQueueRepository>();
repositoryMock.Setup(x => x.UploadQueuedDocument(document)).ReturnsAsync(expectedResponse);

// Act
var result = await repositoryMock.Object.UploadQueuedDocument(document);

// Assert
result.Should().NotBeNull();
result.Status.Should().Be(ExternalResponseStatus.Success);
repositoryMock.Verify(x => x.UploadQueuedDocument(document), Times.Once);
}

[Fact]
public async Task UpdateQueuedDocument_ValidDocument_ReturnsExternalResponse()
{
// Arrange
var documentQueueId = 1;
var document = new DocumentQueueModel { Id = documentQueueId };
var expectedResponse = new ExternalResponse<DocumentQueueModel> { Status = ExternalResponseStatus.Success };
var repositoryMock = new Mock<IPimsDocumentQueueRepository>();
repositoryMock.Setup(x => x.UpdateQueuedDocument(documentQueueId, document)).ReturnsAsync(expectedResponse);

// Act
var result = await repositoryMock.Object.UpdateQueuedDocument(documentQueueId, document);

// Assert
result.Should().NotBeNull();
result.Status.Should().Be(ExternalResponseStatus.Success);
repositoryMock.Verify(x => x.UpdateQueuedDocument(documentQueueId, document), Times.Once);
}

[Fact]
public async Task SearchQueuedDocumentsAsync_ValidFilter_ReturnsExternalResponse()
{
// Arrange
var filter = new DocumentQueueFilter();
var expectedResponse = new ExternalResponse<List<DocumentQueueModel>> { Status = ExternalResponseStatus.Success };
var repositoryMock = new Mock<IPimsDocumentQueueRepository>();
repositoryMock.Setup(x => x.SearchQueuedDocumentsAsync(filter)).ReturnsAsync(expectedResponse);

// Act
var result = await repositoryMock.Object.SearchQueuedDocumentsAsync(filter);

// Assert
result.Should().NotBeNull();
result.Status.Should().Be(ExternalResponseStatus.Success);
repositoryMock.Verify(x => x.SearchQueuedDocumentsAsync(filter), Times.Once);
}

[Fact]
public async Task GetById_ValidDocumentQueueId_ReturnsExternalResponse()
{
// Arrange
var documentQueueId = 1;
var expectedResponse = new ExternalResponse<DocumentQueueModel> { Status = ExternalResponseStatus.Success };
var repositoryMock = new Mock<IPimsDocumentQueueRepository>();
repositoryMock.Setup(x => x.GetById(documentQueueId)).ReturnsAsync(expectedResponse);

// Act
var result = await repositoryMock.Object.GetById(documentQueueId);

// Assert
result.Should().NotBeNull();
result.Status.Should().Be(ExternalResponseStatus.Success);
repositoryMock.Verify(x => x.GetById(documentQueueId), Times.Once);
}
}
}
Loading
Loading