diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index d25bed3..26c7872 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -65,7 +65,7 @@ jobs:
run: dotnet tool install --global dotnet-coverage
- name: dotnet restore
- run: dotnet restore ./v5/ooapi.v5.sln
+ run: dotnet restore ./v5/ooapi.v5.slnx
- name: dotnet build,test and sonar analyze
run: |
@@ -77,6 +77,6 @@ jobs:
-d:sonar.exclusions="**/ooapi.v5.core/Migrations/*" \
-d:sonar.cpd.exclusions="**/ooapi.v5.core/Migrations/*, **/ooapi.v5.core/Models/*" \
-d:sonar.cs.vscoveragexml.reportsPaths=coverage.xml
- dotnet build ./v5/ooapi.v5.sln --no-restore
+ dotnet build ./v5/ooapi.v5.slnx --no-restore
dotnet-coverage collect -s "dotnetcoverage.runsettings.xml" -f xml -o "coverage.xml" "dotnet test ./v5 --no-build"
dotnet sonarscanner end -d:sonar.token="${{ secrets.SONAR_TOKEN }}"
\ No newline at end of file
diff --git a/v5/Directory.Build.props b/v5/Directory.Build.props
new file mode 100644
index 0000000..907bacd
--- /dev/null
+++ b/v5/Directory.Build.props
@@ -0,0 +1,7 @@
+
+
+ latest
+ net10.0
+ enable
+
+
\ No newline at end of file
diff --git a/v5/Directory.Packages.props b/v5/Directory.Packages.props
new file mode 100644
index 0000000..29e72ad
--- /dev/null
+++ b/v5/Directory.Packages.props
@@ -0,0 +1,31 @@
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/v5/NuGet.config b/v5/NuGet.config
new file mode 100644
index 0000000..185bbb8
--- /dev/null
+++ b/v5/NuGet.config
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/v5/ooapi.v5.UnitTests/GlobalUsings.cs b/v5/ooapi.v5.UnitTests/GlobalUsings.cs
index fd5f268..b97a473 100644
--- a/v5/ooapi.v5.UnitTests/GlobalUsings.cs
+++ b/v5/ooapi.v5.UnitTests/GlobalUsings.cs
@@ -1,4 +1,4 @@
global using NUnit.Framework;
global using AutoFixture;
-global using FluentAssertions;
+global using AwesomeAssertions;
global using NSubstitute;
\ No newline at end of file
diff --git a/v5/ooapi.v5.UnitTests/ooapi.v5.UnitTests.csproj b/v5/ooapi.v5.UnitTests/ooapi.v5.UnitTests.csproj
index d2c3eb2..aadec9a 100644
--- a/v5/ooapi.v5.UnitTests/ooapi.v5.UnitTests.csproj
+++ b/v5/ooapi.v5.UnitTests/ooapi.v5.UnitTests.csproj
@@ -1,24 +1,22 @@
- net8.0
enable
- enable
false
true
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
-
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
diff --git a/v5/ooapi.v5.core.UnitTests/Helpers/ConsumerConverterTests.cs b/v5/ooapi.v5.core.UnitTests/Helpers/ConsumerConverterTests.cs
index e94c916..3ce454d 100644
--- a/v5/ooapi.v5.core.UnitTests/Helpers/ConsumerConverterTests.cs
+++ b/v5/ooapi.v5.core.UnitTests/Helpers/ConsumerConverterTests.cs
@@ -1,5 +1,5 @@
using AutoFixture;
-using FluentAssertions;
+using AwesomeAssertions;
using Newtonsoft.Json;
using ooapi.v5.Enums;
using ooapi.v5.Helpers;
diff --git a/v5/ooapi.v5.core.UnitTests/Helpers/DateFormatConverterTests.cs b/v5/ooapi.v5.core.UnitTests/Helpers/DateFormatConverterTests.cs
index 93f2a8d..a9015f1 100644
--- a/v5/ooapi.v5.core.UnitTests/Helpers/DateFormatConverterTests.cs
+++ b/v5/ooapi.v5.core.UnitTests/Helpers/DateFormatConverterTests.cs
@@ -1,5 +1,5 @@
using AutoFixture;
-using FluentAssertions;
+using AwesomeAssertions;
using ooapi.v5.Helpers;
namespace ooapi.v5.core.UnitTests.Helpers;
diff --git a/v5/ooapi.v5.core.UnitTests/Helpers/LanguageTypedStringJsonConverterTests.cs b/v5/ooapi.v5.core.UnitTests/Helpers/LanguageTypedStringJsonConverterTests.cs
index 184235c..0c34356 100644
--- a/v5/ooapi.v5.core.UnitTests/Helpers/LanguageTypedStringJsonConverterTests.cs
+++ b/v5/ooapi.v5.core.UnitTests/Helpers/LanguageTypedStringJsonConverterTests.cs
@@ -1,5 +1,5 @@
using AutoFixture;
-using FluentAssertions;
+using AwesomeAssertions;
using Newtonsoft.Json;
using ooapi.v5.Helpers;
using ooapi.v5.Models;
diff --git a/v5/ooapi.v5.core.UnitTests/Helpers/ListOneOfConverterTests.cs b/v5/ooapi.v5.core.UnitTests/Helpers/ListOneOfConverterTests.cs
index 0e32768..a88b2fe 100644
--- a/v5/ooapi.v5.core.UnitTests/Helpers/ListOneOfConverterTests.cs
+++ b/v5/ooapi.v5.core.UnitTests/Helpers/ListOneOfConverterTests.cs
@@ -1,5 +1,5 @@
using AutoFixture;
-using FluentAssertions;
+using AwesomeAssertions;
using Newtonsoft.Json;
using ooapi.v5.Helpers;
diff --git a/v5/ooapi.v5.core.UnitTests/Helpers/OneOfConverterTests.cs b/v5/ooapi.v5.core.UnitTests/Helpers/OneOfConverterTests.cs
index f504c25..67ae916 100644
--- a/v5/ooapi.v5.core.UnitTests/Helpers/OneOfConverterTests.cs
+++ b/v5/ooapi.v5.core.UnitTests/Helpers/OneOfConverterTests.cs
@@ -1,5 +1,5 @@
using AutoFixture;
-using FluentAssertions;
+using AwesomeAssertions;
using Newtonsoft.Json;
using ooapi.v5.Helpers;
diff --git a/v5/ooapi.v5.core.UnitTests/Models/AcademicSessionTests.cs b/v5/ooapi.v5.core.UnitTests/Models/AcademicSessionTests.cs
index 599362c..c820aba 100644
--- a/v5/ooapi.v5.core.UnitTests/Models/AcademicSessionTests.cs
+++ b/v5/ooapi.v5.core.UnitTests/Models/AcademicSessionTests.cs
@@ -1,5 +1,5 @@
using AutoFixture;
-using FluentAssertions;
+using AwesomeAssertions;
using ooapi.v5.core.Models.OneOfModels;
using ooapi.v5.Models;
using Attribute = ooapi.v5.Models.Attribute;
diff --git a/v5/ooapi.v5.core.UnitTests/Models/AddressTests.cs b/v5/ooapi.v5.core.UnitTests/Models/AddressTests.cs
index 358fb43..1659007 100644
--- a/v5/ooapi.v5.core.UnitTests/Models/AddressTests.cs
+++ b/v5/ooapi.v5.core.UnitTests/Models/AddressTests.cs
@@ -1,5 +1,5 @@
using AutoFixture;
-using FluentAssertions;
+using AwesomeAssertions;
using ooapi.v5.Models;
using Attribute = ooapi.v5.Models.Attribute;
diff --git a/v5/ooapi.v5.core.UnitTests/Models/AssociationTests.cs b/v5/ooapi.v5.core.UnitTests/Models/AssociationTests.cs
index ca354ed..130e977 100644
--- a/v5/ooapi.v5.core.UnitTests/Models/AssociationTests.cs
+++ b/v5/ooapi.v5.core.UnitTests/Models/AssociationTests.cs
@@ -1,5 +1,5 @@
using AutoFixture;
-using FluentAssertions;
+using AwesomeAssertions;
using ooapi.v5.core.Models.OneOfModels;
using ooapi.v5.Models;
diff --git a/v5/ooapi.v5.core.UnitTests/Models/BuildingTests.cs b/v5/ooapi.v5.core.UnitTests/Models/BuildingTests.cs
index e6672d8..356b62c 100644
--- a/v5/ooapi.v5.core.UnitTests/Models/BuildingTests.cs
+++ b/v5/ooapi.v5.core.UnitTests/Models/BuildingTests.cs
@@ -1,5 +1,5 @@
using AutoFixture;
-using FluentAssertions;
+using AwesomeAssertions;
using ooapi.v5.Models;
using Attribute = ooapi.v5.Models.Attribute;
diff --git a/v5/ooapi.v5.core.UnitTests/Models/ComponentOfferingTests.cs b/v5/ooapi.v5.core.UnitTests/Models/ComponentOfferingTests.cs
index cd3f151..638b972 100644
--- a/v5/ooapi.v5.core.UnitTests/Models/ComponentOfferingTests.cs
+++ b/v5/ooapi.v5.core.UnitTests/Models/ComponentOfferingTests.cs
@@ -1,5 +1,5 @@
using AutoFixture;
-using FluentAssertions;
+using AwesomeAssertions;
using ooapi.v5.core.Models.OneOfModels;
using ooapi.v5.Models;
diff --git a/v5/ooapi.v5.core.UnitTests/Models/ComponentTests.cs b/v5/ooapi.v5.core.UnitTests/Models/ComponentTests.cs
index c386cec..3e48ce9 100644
--- a/v5/ooapi.v5.core.UnitTests/Models/ComponentTests.cs
+++ b/v5/ooapi.v5.core.UnitTests/Models/ComponentTests.cs
@@ -1,5 +1,5 @@
using AutoFixture;
-using FluentAssertions;
+using AwesomeAssertions;
using ooapi.v5.core.Models.OneOfModels;
using ooapi.v5.Models;
using Attribute = ooapi.v5.Models.Attribute;
diff --git a/v5/ooapi.v5.core.UnitTests/Models/CostTests.cs b/v5/ooapi.v5.core.UnitTests/Models/CostTests.cs
index cb29ba6..39ba7bb 100644
--- a/v5/ooapi.v5.core.UnitTests/Models/CostTests.cs
+++ b/v5/ooapi.v5.core.UnitTests/Models/CostTests.cs
@@ -1,5 +1,5 @@
using AutoFixture;
-using FluentAssertions;
+using AwesomeAssertions;
using ooapi.v5.Models;
namespace ooapi.v5.core.UnitTests.Models;
diff --git a/v5/ooapi.v5.core.UnitTests/Models/CourseOfferingTests.cs b/v5/ooapi.v5.core.UnitTests/Models/CourseOfferingTests.cs
index 990a220..c5b5f7c 100644
--- a/v5/ooapi.v5.core.UnitTests/Models/CourseOfferingTests.cs
+++ b/v5/ooapi.v5.core.UnitTests/Models/CourseOfferingTests.cs
@@ -1,5 +1,5 @@
using AutoFixture;
-using FluentAssertions;
+using AwesomeAssertions;
using ooapi.v5.core.Models.OneOfModels;
using ooapi.v5.Models;
diff --git a/v5/ooapi.v5.core.UnitTests/Models/CourseResultTests.cs b/v5/ooapi.v5.core.UnitTests/Models/CourseResultTests.cs
index 167fc6e..5c6ec66 100644
--- a/v5/ooapi.v5.core.UnitTests/Models/CourseResultTests.cs
+++ b/v5/ooapi.v5.core.UnitTests/Models/CourseResultTests.cs
@@ -1,5 +1,5 @@
using AutoFixture;
-using FluentAssertions;
+using AwesomeAssertions;
using ooapi.v5.Models;
namespace ooapi.v5.core.UnitTests.Models;
diff --git a/v5/ooapi.v5.core.UnitTests/Models/CourseTests.cs b/v5/ooapi.v5.core.UnitTests/Models/CourseTests.cs
index 05e5370..bcb26c0 100644
--- a/v5/ooapi.v5.core.UnitTests/Models/CourseTests.cs
+++ b/v5/ooapi.v5.core.UnitTests/Models/CourseTests.cs
@@ -1,5 +1,5 @@
using AutoFixture;
-using FluentAssertions;
+using AwesomeAssertions;
using ooapi.v5.core.Models.OneOfModels;
using ooapi.v5.Models;
using Attribute = ooapi.v5.Models.Attribute;
diff --git a/v5/ooapi.v5.core.UnitTests/Models/EducationSpecificationTests.cs b/v5/ooapi.v5.core.UnitTests/Models/EducationSpecificationTests.cs
index 59eabe7..230d9fd 100644
--- a/v5/ooapi.v5.core.UnitTests/Models/EducationSpecificationTests.cs
+++ b/v5/ooapi.v5.core.UnitTests/Models/EducationSpecificationTests.cs
@@ -1,8 +1,7 @@
using AutoFixture;
-using FluentAssertions;
+using AwesomeAssertions;
using ooapi.v5.core.Models.OneOfModels;
using ooapi.v5.Models;
-using Attribute = ooapi.v5.Models.Attribute;
namespace ooapi.v5.core.UnitTests.Models;
diff --git a/v5/ooapi.v5.core.UnitTests/Models/ErrorResponseTests.cs b/v5/ooapi.v5.core.UnitTests/Models/ErrorResponseTests.cs
index 7c23159..d1cbda9 100644
--- a/v5/ooapi.v5.core.UnitTests/Models/ErrorResponseTests.cs
+++ b/v5/ooapi.v5.core.UnitTests/Models/ErrorResponseTests.cs
@@ -1,5 +1,5 @@
using AutoFixture;
-using FluentAssertions;
+using AwesomeAssertions;
using ooapi.v5.Models;
namespace ooapi.v5.core.UnitTests.Models;
diff --git a/v5/ooapi.v5.core.UnitTests/Models/GroupTests.cs b/v5/ooapi.v5.core.UnitTests/Models/GroupTests.cs
index bf64914..876b516 100644
--- a/v5/ooapi.v5.core.UnitTests/Models/GroupTests.cs
+++ b/v5/ooapi.v5.core.UnitTests/Models/GroupTests.cs
@@ -1,5 +1,5 @@
using AutoFixture;
-using FluentAssertions;
+using AwesomeAssertions;
using ooapi.v5.core.Models.OneOfModels;
using ooapi.v5.Models;
using Attribute = ooapi.v5.Models.Attribute;
diff --git a/v5/ooapi.v5.core.UnitTests/Models/NewsFeedTests.cs b/v5/ooapi.v5.core.UnitTests/Models/NewsFeedTests.cs
index 969643e..46b2ede 100644
--- a/v5/ooapi.v5.core.UnitTests/Models/NewsFeedTests.cs
+++ b/v5/ooapi.v5.core.UnitTests/Models/NewsFeedTests.cs
@@ -1,5 +1,5 @@
using AutoFixture;
-using FluentAssertions;
+using AwesomeAssertions;
using ooapi.v5.Models;
using Attribute = ooapi.v5.Models.Attribute;
diff --git a/v5/ooapi.v5.core.UnitTests/Models/NewsItemTests.cs b/v5/ooapi.v5.core.UnitTests/Models/NewsItemTests.cs
index e597633..6ef23d8 100644
--- a/v5/ooapi.v5.core.UnitTests/Models/NewsItemTests.cs
+++ b/v5/ooapi.v5.core.UnitTests/Models/NewsItemTests.cs
@@ -1,5 +1,5 @@
using AutoFixture;
-using FluentAssertions;
+using AwesomeAssertions;
using ooapi.v5.Models;
using Attribute = ooapi.v5.Models.Attribute;
diff --git a/v5/ooapi.v5.core.UnitTests/Models/OfferingTests.cs b/v5/ooapi.v5.core.UnitTests/Models/OfferingTests.cs
index 7549568..3fcfbe4 100644
--- a/v5/ooapi.v5.core.UnitTests/Models/OfferingTests.cs
+++ b/v5/ooapi.v5.core.UnitTests/Models/OfferingTests.cs
@@ -1,5 +1,5 @@
using AutoFixture;
-using FluentAssertions;
+using AwesomeAssertions;
using ooapi.v5.core.Models.OneOfModels;
using ooapi.v5.Models;
using Attribute = ooapi.v5.Models.Attribute;
@@ -126,7 +126,7 @@ public void GetName_WhenAttributesExist_ReturnsListLanguageTypedString()
{
// Arrange
var offering = _fixture.Build()
- .With(x => x.Attributes, new List() { new() { PropertyName = "name", Language = "en", Value = "TestName" } })
+ .With(x => x.Attributes, new List() { new() { PropertyName = "name", Language = "en", Value = "TestName" } })
.OmitAutoProperties()
.Create();
@@ -141,12 +141,13 @@ public void GetName_WhenAttributesExist_ReturnsListLanguageTypedString()
result[0].Value.Should().Be("TestName");
}
+
[Test]
public void GetName_WhenAttributesAreEmpty_ReturnsEmptyListLanguageTypedString()
{
// Arrange
var offering = _fixture.Build()
- .With(x => x.Attributes, new List() { })
+ .With(x => x.Attributes, new List() { })
.OmitAutoProperties()
.Create();
@@ -158,13 +159,14 @@ public void GetName_WhenAttributesAreEmpty_ReturnsEmptyListLanguageTypedString()
result.Should().BeOfType>();
result.Should().HaveCount(0);
}
-
+
+
[Test]
public void GetDescription_WhenAttributesExist_ReturnsListLanguageTypedString()
{
// Arrange
var offering = _fixture.Build()
- .With(x => x.Attributes, new List() { new() { PropertyName = "description", Language = "en", Value = "TestName" } })
+ .With(x => x.Attributes, new List() { new() { PropertyName = "description", Language = "en", Value = "TestName" } })
.OmitAutoProperties()
.Create();
@@ -179,12 +181,13 @@ public void GetDescription_WhenAttributesExist_ReturnsListLanguageTypedString()
result[0].Value.Should().Be("TestName");
}
+
[Test]
public void GetDescription_WhenAttributesAreEmpty_ReturnsEmptyListLanguageTypedString()
{
// Arrange
var offering = _fixture.Build()
- .With(x => x.Attributes, new List() { })
+ .With(x => x.Attributes, new List() { })
.OmitAutoProperties()
.Create();
@@ -196,7 +199,8 @@ public void GetDescription_WhenAttributesAreEmpty_ReturnsEmptyListLanguageTypedS
result.Should().BeOfType>();
result.Should().HaveCount(0);
}
-
+
+
[TestCase("distance-learning", Enums.ModeOfDelivery.distance_learning)]
[TestCase("on campus", Enums.ModeOfDelivery.on_campus)]
[TestCase("online", Enums.ModeOfDelivery.online)]
diff --git a/v5/ooapi.v5.core.UnitTests/Models/OrganizationTests.cs b/v5/ooapi.v5.core.UnitTests/Models/OrganizationTests.cs
index cbffdf3..1190cfe 100644
--- a/v5/ooapi.v5.core.UnitTests/Models/OrganizationTests.cs
+++ b/v5/ooapi.v5.core.UnitTests/Models/OrganizationTests.cs
@@ -1,5 +1,5 @@
using AutoFixture;
-using FluentAssertions;
+using AwesomeAssertions;
using ooapi.v5.core.Models.OneOfModels;
using ooapi.v5.Models;
using Attribute = ooapi.v5.Models.Attribute;
diff --git a/v5/ooapi.v5.core.UnitTests/Models/PaginationTests.cs b/v5/ooapi.v5.core.UnitTests/Models/PaginationTests.cs
index ed6aff3..a32e25c 100644
--- a/v5/ooapi.v5.core.UnitTests/Models/PaginationTests.cs
+++ b/v5/ooapi.v5.core.UnitTests/Models/PaginationTests.cs
@@ -1,5 +1,5 @@
using AutoFixture;
-using FluentAssertions;
+using AwesomeAssertions;
using MockQueryable.NSubstitute;
using ooapi.v5.core.Utility;
using ooapi.v5.Models;
@@ -20,7 +20,7 @@ public async Task Constructor_WithoutFilter_SetItems()
.With(x => x.PageSize, 100)
.Without(x => x.Filter)
.Create();
- var db = items.AsQueryable().BuildMockDbSet();
+ var db = items.BuildMockDbSet();
// act
var pagination = await Pagination.CreateAsync(db, parameters);
@@ -44,7 +44,7 @@ public async Task Constructor_WithFilter_SetItems()
.With(x => x.PageSize, 2)
.With(x => x.Filter, "value eq test")
.Create();
- var db = items.AsQueryable().BuildMockDbSet();
+ var db = items.BuildMockDbSet();
// act
var pagination = await Pagination.CreateAsync(db, parameters);
diff --git a/v5/ooapi.v5.core.UnitTests/Models/PersonTests.cs b/v5/ooapi.v5.core.UnitTests/Models/PersonTests.cs
index 5379a59..59de1ab 100644
--- a/v5/ooapi.v5.core.UnitTests/Models/PersonTests.cs
+++ b/v5/ooapi.v5.core.UnitTests/Models/PersonTests.cs
@@ -1,5 +1,5 @@
using AutoFixture;
-using FluentAssertions;
+using AwesomeAssertions;
using Newtonsoft.Json.Linq;
using ooapi.v5.Enums;
using ooapi.v5.Models;
diff --git a/v5/ooapi.v5.core.UnitTests/Models/PostResponseTests.cs b/v5/ooapi.v5.core.UnitTests/Models/PostResponseTests.cs
index 1c390e5..6da84fd 100644
--- a/v5/ooapi.v5.core.UnitTests/Models/PostResponseTests.cs
+++ b/v5/ooapi.v5.core.UnitTests/Models/PostResponseTests.cs
@@ -1,5 +1,5 @@
using AutoFixture;
-using FluentAssertions;
+using AwesomeAssertions;
using Newtonsoft.Json;
using ooapi.v5.Models;
diff --git a/v5/ooapi.v5.core.UnitTests/Models/ProgramOfferingTests.cs b/v5/ooapi.v5.core.UnitTests/Models/ProgramOfferingTests.cs
index 8db9a7a..a621193 100644
--- a/v5/ooapi.v5.core.UnitTests/Models/ProgramOfferingTests.cs
+++ b/v5/ooapi.v5.core.UnitTests/Models/ProgramOfferingTests.cs
@@ -1,5 +1,5 @@
using AutoFixture;
-using FluentAssertions;
+using AwesomeAssertions;
using ooapi.v5.core.Models.OneOfModels;
using ooapi.v5.Models;
diff --git a/v5/ooapi.v5.core.UnitTests/Models/ProgramResultTests.cs b/v5/ooapi.v5.core.UnitTests/Models/ProgramResultTests.cs
index 981ee1f..dd4fb30 100644
--- a/v5/ooapi.v5.core.UnitTests/Models/ProgramResultTests.cs
+++ b/v5/ooapi.v5.core.UnitTests/Models/ProgramResultTests.cs
@@ -1,5 +1,5 @@
using AutoFixture;
-using FluentAssertions;
+using AwesomeAssertions;
using ooapi.v5.Models;
namespace ooapi.v5.core.UnitTests.Models;
diff --git a/v5/ooapi.v5.core.UnitTests/Models/ProgramTests.cs b/v5/ooapi.v5.core.UnitTests/Models/ProgramTests.cs
index e0c31f3..60a29fe 100644
--- a/v5/ooapi.v5.core.UnitTests/Models/ProgramTests.cs
+++ b/v5/ooapi.v5.core.UnitTests/Models/ProgramTests.cs
@@ -1,5 +1,5 @@
using AutoFixture;
-using FluentAssertions;
+using AwesomeAssertions;
using Newtonsoft.Json.Linq;
using ooapi.v5.core.Models.OneOfModels;
using ooapi.v5.Enums;
diff --git a/v5/ooapi.v5.core.UnitTests/Models/RoomTests.cs b/v5/ooapi.v5.core.UnitTests/Models/RoomTests.cs
index 4ebd8ff..491b5ed 100644
--- a/v5/ooapi.v5.core.UnitTests/Models/RoomTests.cs
+++ b/v5/ooapi.v5.core.UnitTests/Models/RoomTests.cs
@@ -1,5 +1,5 @@
using AutoFixture;
-using FluentAssertions;
+using AwesomeAssertions;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using ooapi.v5.core.Models.OneOfModels;
diff --git a/v5/ooapi.v5.core.UnitTests/Models/ServiceTests.cs b/v5/ooapi.v5.core.UnitTests/Models/ServiceTests.cs
index 9d69fe0..eab029c 100644
--- a/v5/ooapi.v5.core.UnitTests/Models/ServiceTests.cs
+++ b/v5/ooapi.v5.core.UnitTests/Models/ServiceTests.cs
@@ -1,5 +1,5 @@
using AutoFixture;
-using FluentAssertions;
+using AwesomeAssertions;
using Newtonsoft.Json.Linq;
using ooapi.v5.Enums;
using ooapi.v5.Models;
diff --git a/v5/ooapi.v5.core.UnitTests/Repositories/AcademicSessionsRepositoryTests.cs b/v5/ooapi.v5.core.UnitTests/Repositories/AcademicSessionsRepositoryTests.cs
index a5aa877..42b84d4 100644
--- a/v5/ooapi.v5.core.UnitTests/Repositories/AcademicSessionsRepositoryTests.cs
+++ b/v5/ooapi.v5.core.UnitTests/Repositories/AcademicSessionsRepositoryTests.cs
@@ -19,7 +19,7 @@ public async Task GetAcademicSession_WithValidId_ReturnsAcademicSession()
{
// Arrange
var academicSessions = CreateDefaultAcademicSessions();
-
+
var db = academicSessions.BuildMockDbSet();
var dbContext = Substitute.For();
dbContext.AcademicSessionsNoTracking.Returns(db);
@@ -122,7 +122,7 @@ public async Task GetAllOrderedBy_WithAcademicSessionType_ReturnsFilteredSet()
.Without(a => a.CourseOfferings)
.Without(a => a.ComponentOfferings)
.Create()
- }.AsQueryable();
+ };
var db = academicSessions.BuildMockDbSet();
var dbContext = Substitute.For();
@@ -141,7 +141,7 @@ public async Task GetAllOrderedBy_WithAcademicSessionType_ReturnsFilteredSet()
});
}
- private IQueryable CreateDefaultAcademicSessions()
+ private IList CreateDefaultAcademicSessions()
{
return _fixture.Build()
.Without(a => a.Children)
@@ -151,6 +151,6 @@ private IQueryable CreateDefaultAcademicSessions()
.Without(a => a.CourseOfferings)
.Without(a => a.ComponentOfferings)
.CreateMany(2)
- .AsQueryable();
+ .ToList();
}
}
\ No newline at end of file
diff --git a/v5/ooapi.v5.core.UnitTests/Repositories/AssociationsRepositoryTests.cs b/v5/ooapi.v5.core.UnitTests/Repositories/AssociationsRepositoryTests.cs
index 75b7dc1..627a070 100644
--- a/v5/ooapi.v5.core.UnitTests/Repositories/AssociationsRepositoryTests.cs
+++ b/v5/ooapi.v5.core.UnitTests/Repositories/AssociationsRepositoryTests.cs
@@ -26,7 +26,7 @@ public async Task GetAssociation_WhenAssociationExists_ReturnsAssociation()
.Without(x => x.CourseOffering)
.Without(x => x.ComponentOffering)
.CreateMany(1)
- .AsQueryable();
+ .ToList();
var db = association.BuildMockDbSet();
var dbContext = Substitute.For();
@@ -46,7 +46,7 @@ public async Task GetAssociation_WhenAssociationDoesNotExist_ReturnsNull()
// Arrange
var associationId = _fixture.Create();
- var association = new List().AsQueryable();
+ var association = new List();
var db = association.BuildMockDbSet();
var dbContext = Substitute.For();
@@ -72,7 +72,7 @@ public async Task GetAssociationsByPersonId_WhenAssociationsExist_ReturnsAssocia
.Without(x => x.CourseOffering)
.Without(x => x.ComponentOffering)
.CreateMany(5)
- .AsQueryable();
+ .ToList();
var db = associations.BuildMockDbSet();
var dbContext = Substitute.For();
@@ -92,7 +92,7 @@ public async Task GetAssociationsByPersonId_WhenAssociationsDoNotExist_ReturnsEm
// Arrange
var personId = _fixture.Create();
- var association = new List().AsQueryable();
+ var association = new List();
var db = association.BuildMockDbSet();
var dbContext = Substitute.For();
dbContext.Associations.Returns(db);
diff --git a/v5/ooapi.v5.core.UnitTests/Repositories/BaseRepositoryTests.cs b/v5/ooapi.v5.core.UnitTests/Repositories/BaseRepositoryTests.cs
index b48a0c4..aa90962 100644
--- a/v5/ooapi.v5.core.UnitTests/Repositories/BaseRepositoryTests.cs
+++ b/v5/ooapi.v5.core.UnitTests/Repositories/BaseRepositoryTests.cs
@@ -21,7 +21,7 @@ public async Task GetAllOrderedBy_WithPrimaryCodeSearch_ReturnsFilteredSet()
{
new Foo() { PrimaryCode = "123" },
new Foo() { PrimaryCode = "456" }
- }.AsQueryable().BuildMockDbSet();
+ }.BuildMockDbSet();
// Act
var result = await repository.GetAllOrderedByAsync(dataRequestParameters, set);
@@ -39,7 +39,7 @@ public async Task GetAllOrderedBy_WithFilters_ReturnsFilteredSet()
{
new Foo() { PrimaryCode = "123", PrimaryCodeType = "x-test"},
new Foo() { PrimaryCode = "456", PrimaryCodeType = "not-x-test"}
- }.AsQueryable().BuildMockDbSet();
+ }.BuildMockDbSet();
var dataRequestParameters = new DataRequestParameters { Filters = new Dictionary { { "PrimaryCodeType", "x-test" } } };
var repository = GetRepository();
@@ -61,7 +61,7 @@ public async Task GetAllOrderedBy_WithNoParameters_ReturnsAll()
{
new Foo() { PrimaryCode = "123", PrimaryCodeType = "x-test"},
new Foo() { PrimaryCode = "456", PrimaryCodeType = "not-x-test"}
- }.AsQueryable().BuildMockDbSet();
+ }.BuildMockDbSet();
var repository = GetRepository();
// Act
@@ -81,7 +81,7 @@ public async Task GetAllOrderedBy_WithNoSetSupplied_ReturnsSetFromDbContext()
{
new Foo() { PrimaryCode = "123", PrimaryCodeType = "x-test"},
new Foo() { PrimaryCode = "456", PrimaryCodeType = "not-x-test"}
- }.AsQueryable().BuildMockDbSet();
+ }.BuildMockDbSet();
var repository = GetRepository(dbContextSet);
// Act
diff --git a/v5/ooapi.v5.core.UnitTests/Repositories/BuildingsRepositoryTests.cs b/v5/ooapi.v5.core.UnitTests/Repositories/BuildingsRepositoryTests.cs
index 3dd3066..c2be96e 100644
--- a/v5/ooapi.v5.core.UnitTests/Repositories/BuildingsRepositoryTests.cs
+++ b/v5/ooapi.v5.core.UnitTests/Repositories/BuildingsRepositoryTests.cs
@@ -23,7 +23,7 @@ public async Task GetBuilding_WhenBuildingExists_ReturnsBuilding()
.With(x => x.BuildingId, buildingId)
.Without(x => x.Address)
.CreateMany(1)
- .AsQueryable();
+ .ToList();
var db = building.BuildMockDbSet();
var dbContext = Substitute.For();
@@ -42,7 +42,7 @@ public async Task GetBuilding_WhenBuildingDoesNotExist_ReturnsNull()
{
// Arrange
var buildingId = _fixture.Create();
- var buildings = new List { }.AsQueryable();
+ var buildings = new List();
var db = buildings.BuildMockDbSet();
var dbContext = Substitute.For();
@@ -74,7 +74,7 @@ public async Task GetAllOrderedBy_WithDataRequestParameters_ReturnsSet()
.With(x => x.Address, new Address())
.With(x => x.Attributes, _fixture.Build().CreateMany(3).ToList())
.Create()
- }.AsQueryable();
+ };
var db = buildings.BuildMockDbSet();
var dbContext = Substitute.For();
diff --git a/v5/ooapi.v5.core.UnitTests/Repositories/ComponentOfferingsRepositoryTests.cs b/v5/ooapi.v5.core.UnitTests/Repositories/ComponentOfferingsRepositoryTests.cs
index 79f52ae..89784d2 100644
--- a/v5/ooapi.v5.core.UnitTests/Repositories/ComponentOfferingsRepositoryTests.cs
+++ b/v5/ooapi.v5.core.UnitTests/Repositories/ComponentOfferingsRepositoryTests.cs
@@ -28,7 +28,7 @@ public async Task GetComponentOffering_WhenComponentOfferingExists_ReturnsCompon
.Without(x => x.Address)
.Without(x => x.Costs)
.Create();
- var componentOfferings = new List { componentOffering }.AsQueryable();
+ var componentOfferings = new List { componentOffering };
var db = componentOfferings.BuildMockDbSet();
var dbContext = Substitute.For();
@@ -47,7 +47,7 @@ public async Task GetComponentOffering_WhenComponentOfferingDoesNotExist_Returns
{
// Arrange
var courseOfferingId = _fixture.Create();
- var componentOfferings = new List { }.AsQueryable();
+ var componentOfferings = new List();
var db = componentOfferings.BuildMockDbSet();
var dbContext = Substitute.For();
@@ -76,7 +76,7 @@ public async Task GetComponentOfferingByComponentId_WhenComponentOfferingsExist_
.Without(x => x.Address)
.Without(x => x.Costs)
.Create();
- var componentOfferings = new List { componentOffering }.AsQueryable();
+ var componentOfferings = new List { componentOffering };
var db = componentOfferings.BuildMockDbSet();
var dbContext = Substitute.For();
@@ -97,7 +97,7 @@ public async Task GetComponentOfferingByComponentId_WhenComponentOfferingsDoNotE
{
// Arrange
var componentId = _fixture.Create();
- var componentOfferings = new List { }.AsQueryable();
+ var componentOfferings = new List ();
var db = componentOfferings.BuildMockDbSet();
var dbContext = Substitute.For();
diff --git a/v5/ooapi.v5.core.UnitTests/Repositories/ComponentsRepositoryTests.cs b/v5/ooapi.v5.core.UnitTests/Repositories/ComponentsRepositoryTests.cs
index 7d51c79..57ce6e2 100644
--- a/v5/ooapi.v5.core.UnitTests/Repositories/ComponentsRepositoryTests.cs
+++ b/v5/ooapi.v5.core.UnitTests/Repositories/ComponentsRepositoryTests.cs
@@ -27,7 +27,7 @@ public async Task GetComponent_WhenComponentExists_ReturnsComponent()
.Without(x => x.Course)
.Without(x => x.Organization)
.Create();
- var components = new List { component }.AsQueryable();
+ var components = new List { component };
var db = components.BuildMockDbSet();
var dbContext = Substitute.For();
@@ -55,7 +55,7 @@ public async Task GetComponent_WhenComponentNotFound_ReturnsNull()
.Without(x => x.Course)
.Without(x => x.Organization)
.Create();
- var components = new List { component }.AsQueryable();
+ var components = new List { component };
var db = components.BuildMockDbSet();
var dbContext = Substitute.For();
@@ -83,7 +83,7 @@ public async Task GetComponentsByCourseId_WhenComponentWithCourseIdExists_Return
.Without(x => x.Course)
.Without(x => x.Organization)
.Create();
- var components = new List { component }.AsQueryable();
+ var components = new List { component };
var db = components.BuildMockDbSet();
var dbContext = Substitute.For();
@@ -113,7 +113,7 @@ public async Task GetComponentsByCourseId_WhenComponentWithCourseNotFound_Return
.Without(x => x.Course)
.Without(x => x.Organization)
.Create();
- var components = new List { component }.AsQueryable();
+ var components = new List { component };
var db = components.BuildMockDbSet();
var dbContext = Substitute.For();
@@ -143,7 +143,7 @@ public async Task GetComponentsByOrganizationId_WhenComponentWithOrganizationIdE
.Without(x => x.Course)
.Without(x => x.Organization)
.Create();
- var components = new List { component }.AsQueryable();
+ var components = new List { component };
var db = components.BuildMockDbSet();
var dbContext = Substitute.For();
@@ -173,7 +173,7 @@ public async Task GetComponentsByOrganizationId_WhenComponentWithOrganizationIdN
.Without(x => x.Course)
.Without(x => x.Organization)
.Create();
- var components = new List { component }.AsQueryable();
+ var components = new List { component };
var db = components.BuildMockDbSet();
var dbContext = Substitute.For();
diff --git a/v5/ooapi.v5.core.UnitTests/Repositories/CourseOfferingsRepositoryTests.cs b/v5/ooapi.v5.core.UnitTests/Repositories/CourseOfferingsRepositoryTests.cs
index d355ac3..890fb2f 100644
--- a/v5/ooapi.v5.core.UnitTests/Repositories/CourseOfferingsRepositoryTests.cs
+++ b/v5/ooapi.v5.core.UnitTests/Repositories/CourseOfferingsRepositoryTests.cs
@@ -28,7 +28,7 @@ public async Task GetCourseOffering_WhenCourseOfferingExists_ReturnsCourseOfferi
.Without(x => x.ProgramOffering)
.Without(x => x.PriceInformation)
.Create();
- var courseOfferings = new List { courseOffering }.AsQueryable();
+ var courseOfferings = new List { courseOffering };
var db = courseOfferings.BuildMockDbSet();
var dbContext = Substitute.For();
@@ -57,7 +57,7 @@ public async Task GetCourseOffering_WhenCourseOfferingDoesNotFound_ReturnsNull()
.Without(x => x.ProgramOffering)
.Without(x => x.PriceInformation)
.Create();
- var courseOfferings = new List { courseOffering }.AsQueryable();
+ var courseOfferings = new List { courseOffering };
var db = courseOfferings.BuildMockDbSet();
var dbContext = Substitute.For();
@@ -87,7 +87,7 @@ public async Task GetCourseOfferingByCourseId_WhenCourseOfferingsExist_ReturnsCo
.Without(x => x.ProgramOffering)
.Without(x => x.PriceInformation)
.Create();
- var courseOfferings = new List { courseOffering }.AsQueryable();
+ var courseOfferings = new List { courseOffering };
var db = courseOfferings.BuildMockDbSet();
var dbContext = Substitute.For();
@@ -119,7 +119,7 @@ public async Task GetCourseOfferingByCourseId_WhenCourseOfferingsNotFound_Return
.Without(x => x.ProgramOffering)
.Without(x => x.PriceInformation)
.Create();
- var courseOfferings = new List { courseOffering }.AsQueryable();
+ var courseOfferings = new List { courseOffering };
var db = courseOfferings.BuildMockDbSet();
var dbContext = Substitute.For();
diff --git a/v5/ooapi.v5.core.UnitTests/Repositories/CoursesRepositoryTests.cs b/v5/ooapi.v5.core.UnitTests/Repositories/CoursesRepositoryTests.cs
index 0c1c32c..0d87604 100644
--- a/v5/ooapi.v5.core.UnitTests/Repositories/CoursesRepositoryTests.cs
+++ b/v5/ooapi.v5.core.UnitTests/Repositories/CoursesRepositoryTests.cs
@@ -30,7 +30,7 @@ public async Task GetCourse_WhenCourseExists_ReturnsCourse()
.Without(x => x.CoordinatorsRef)
.Without(x => x.ProgramsRef)
.Create();
- var courses = new List { course }.AsQueryable();
+ var courses = new List { course };
var db = courses.BuildMockDbSet();
var dbContext = Substitute.For();
@@ -61,7 +61,7 @@ public async Task GetCourse_WhenCourseDoesNotFound_ReturnsNull()
.Without(x => x.CoordinatorsRef)
.Without(x => x.ProgramsRef)
.Create();
- var courses = new List { course }.AsQueryable();
+ var courses = new List { course };
var db = courses.BuildMockDbSet();
var dbContext = Substitute.For();
@@ -92,7 +92,7 @@ public async Task GetCourseByEducationSpecificationId_WhenCoursesExist_ReturnsCo
.Without(x => x.CoordinatorsRef)
.Without(x => x.ProgramsRef)
.Create();
- var courses = new List { course }.AsQueryable();
+ var courses = new List { course };
var db = courses.BuildMockDbSet();
var dbContext = Substitute.For();
@@ -125,7 +125,7 @@ public async Task GetCourseByEducationSpecificationId_WhenCoursesNotFound_Return
.Without(x => x.CoordinatorsRef)
.Without(x => x.ProgramsRef)
.Create();
- var courses = new List { course }.AsQueryable();
+ var courses = new List { course };
var db = courses.BuildMockDbSet();
var dbContext = Substitute.For();
@@ -157,7 +157,7 @@ public async Task GetCoursesByOrganizationId_WhenCoursesExist_ReturnsCourses()
.Without(x => x.CoordinatorsRef)
.Without(x => x.ProgramsRef)
.Create();
- var courses = new List { course }.AsQueryable();
+ var courses = new List { course };
var db = courses.BuildMockDbSet();
var dbContext = Substitute.For();
@@ -192,7 +192,7 @@ public async Task GetCoursesByOrganizationId_WhenCoursesNotFound_ReturnsEmptyLis
.Without(x => x.CoordinatorsRef)
.Without(x => x.ProgramsRef)
.Create();
- var courses = new List { course }.AsQueryable();
+ var courses = new List { course };
var db = courses.BuildMockDbSet();
var dbContext = Substitute.For();
diff --git a/v5/ooapi.v5.core.UnitTests/Repositories/EducationSpecificationsRepositoryTests.cs b/v5/ooapi.v5.core.UnitTests/Repositories/EducationSpecificationsRepositoryTests.cs
index ed362ff..9b44737 100644
--- a/v5/ooapi.v5.core.UnitTests/Repositories/EducationSpecificationsRepositoryTests.cs
+++ b/v5/ooapi.v5.core.UnitTests/Repositories/EducationSpecificationsRepositoryTests.cs
@@ -37,7 +37,7 @@ public async Task GetAllOrderedBy_WithDataRequestParameters_ReturnsSet()
.Without(x => x.Children)
.Without(x => x.Organization)
.Create()
- }.AsQueryable();
+ };
var db = educationSpecifications.BuildMockDbSet();
var dbContext = Substitute.For();
@@ -64,7 +64,7 @@ public async Task GetEducationSpecificationsByEducationSpecificationId_WhenEduca
.Without(x => x.Children)
.Without(x => x.Organization)
.Create();
- var educationSpecifications = new List { educationSpecification }.AsQueryable();
+ var educationSpecifications = new List { educationSpecification };
var db = educationSpecifications.BuildMockDbSet();
var dbContext = Substitute.For();
@@ -94,7 +94,7 @@ public async Task GetEducationSpecificationsByEducationSpecificationId_WhenEduca
.Without(x => x.Children)
.Without(x => x.Organization)
.Create();
- var educationSpecifications = new List { educationSpecification }.AsQueryable();
+ var educationSpecifications = new List { educationSpecification };
var db = educationSpecifications.BuildMockDbSet();
var dbContext = Substitute.For();
@@ -123,7 +123,7 @@ public async Task GetEducationSpecificationsByOrganizationId_WhenEducationSpecif
.Without(x => x.Children)
.Without(x => x.Organization)
.Create();
- var educationSpecifications = new List { educationSpecification }.AsQueryable();
+ var educationSpecifications = new List { educationSpecification };
var db = educationSpecifications.BuildMockDbSet();
var dbContext = Substitute.For();
@@ -153,7 +153,7 @@ public async Task GetEducationSpecificationsByOrganizationId_WhenEducationSpecif
.Without(x => x.Children)
.Without(x => x.Organization)
.Create();
- var educationSpecifications = new List { educationSpecification }.AsQueryable();
+ var educationSpecifications = new List { educationSpecification };
var db = educationSpecifications.BuildMockDbSet();
var dbContext = Substitute.For();
@@ -182,7 +182,7 @@ public async Task GetEducationSpecification_WhenEducationSpecificationExist_Retu
.Without(x => x.Children)
.Without(x => x.Organization)
.Create();
- var educationSpecifications = new List { educationSpecification }.AsQueryable();
+ var educationSpecifications = new List { educationSpecification };
var db = educationSpecifications.BuildMockDbSet();
var dbContext = Substitute.For();
@@ -218,7 +218,7 @@ public async Task GetEducationSpecification_WhenExpandParentRequestedViaRequestP
.Without(x => x.Children)
.Without(x => x.Organization)
.Create();
- var educationSpecifications = new List { educationSpecification, parentEducationSpecification }.AsQueryable();
+ var educationSpecifications = new List { educationSpecification, parentEducationSpecification };
var db = educationSpecifications.BuildMockDbSet();
var dbContext = Substitute.For();
@@ -271,7 +271,7 @@ public async Task GetEducationSpecification_WhenExpandChildrenRequestedViaReques
.Without(x => x.Children)
.Without(x => x.Organization)
.Create();
- var educationSpecifications = new List { educationSpecification, firstChildEducationSpecification, secondChildEducationSpecification }.AsQueryable();
+ var educationSpecifications = new List { educationSpecification, firstChildEducationSpecification, secondChildEducationSpecification };
var db = educationSpecifications.BuildMockDbSet();
var dbContext = Substitute.For();
@@ -310,7 +310,7 @@ public async Task GetEducationSpecification_WhenExpandOrganizationRequestedViaRe
.Without(x => x.Children)
.Without(x => x.Organization)
.Create();
- var educationSpecifications = new List { educationSpecification }.AsQueryable();
+ var educationSpecifications = new List { educationSpecification };
var organization = _fixture.Build()
.With(x => x.OrganizationId, organizationId)
@@ -319,7 +319,7 @@ public async Task GetEducationSpecification_WhenExpandOrganizationRequestedViaRe
.Without(x => x.Parent)
.Without(x => x.Children)
.Create();
- var organizations = new List() { organization }.AsQueryable();
+ var organizations = new List() { organization };
var db = educationSpecifications.BuildMockDbSet();
var orgDb = organizations.BuildMockDbSet();
diff --git a/v5/ooapi.v5.core.UnitTests/Repositories/GroupsRepositoryTests.cs b/v5/ooapi.v5.core.UnitTests/Repositories/GroupsRepositoryTests.cs
index 18b4c25..dc5b8de 100644
--- a/v5/ooapi.v5.core.UnitTests/Repositories/GroupsRepositoryTests.cs
+++ b/v5/ooapi.v5.core.UnitTests/Repositories/GroupsRepositoryTests.cs
@@ -23,7 +23,7 @@ public async Task GetGroup_ReturnsGroup_WhenGroupExists()
.Without(x => x.Organization)
.Without(x => x.Persons)
.Create();
- var groups = new List { group }.AsQueryable();
+ var groups = new List { group };
var db = groups.BuildMockDbSet();
var dbContext = Substitute.For();
@@ -47,7 +47,7 @@ public async Task GetGroup_ReturnsNull_WhenGroupDoesNotFound()
.Without(x => x.Organization)
.Without(x => x.Persons)
.Create();
- var groups = new List { group }.AsQueryable();
+ var groups = new List { group };
var db = groups.BuildMockDbSet();
var dbContext = Substitute.For();
@@ -71,7 +71,7 @@ public async Task GetGroupByOrganizationId_WhenGroupsExist_ReturnsGroups()
.Without(x => x.Organization)
.Without(x => x.Persons)
.Create();
- var groups = new List { group }.AsQueryable();
+ var groups = new List { group };
var db = groups.BuildMockDbSet();
var dbContext = Substitute.For();
@@ -99,7 +99,7 @@ public async Task GetGroupByOrganizationId_WhenGroupsNotFound_ReturnsEmptyList()
.Without(x => x.Organization)
.Without(x => x.Persons)
.Create();
- var groups = new List { group }.AsQueryable();
+ var groups = new List { group };
var db = groups.BuildMockDbSet();
var dbContext = Substitute.For();
diff --git a/v5/ooapi.v5.core.UnitTests/Repositories/NewsFeedsRepositoryTests.cs b/v5/ooapi.v5.core.UnitTests/Repositories/NewsFeedsRepositoryTests.cs
index 7ea9603..39bbc92 100644
--- a/v5/ooapi.v5.core.UnitTests/Repositories/NewsFeedsRepositoryTests.cs
+++ b/v5/ooapi.v5.core.UnitTests/Repositories/NewsFeedsRepositoryTests.cs
@@ -22,7 +22,7 @@ public async Task GetNewsItem_WhenNewsItemExists_ReturnsNewsItem()
.Without(x => x.NewsFeeds)
.Without(x => x.OneOfNewsFeeds)
.Create();
- var newsItems = new List { newsItem }.AsQueryable();
+ var newsItems = new List { newsItem };
var db = newsItems.BuildMockDbSet();
var dbContext = Substitute.For();
@@ -46,7 +46,7 @@ public async Task GetNewsItem_WhenNewsItemDoesNotFound_ReturnsNull()
.Without(x => x.NewsFeeds)
.Without(x => x.OneOfNewsFeeds)
.Create();
- var newsItems = new List { newsItem }.AsQueryable();
+ var newsItems = new List { newsItem };
var db = newsItems.BuildMockDbSet();
var dbContext = Substitute.For();
diff --git a/v5/ooapi.v5.core.UnitTests/Repositories/NewsItemsRepositoryTests.cs b/v5/ooapi.v5.core.UnitTests/Repositories/NewsItemsRepositoryTests.cs
index 92bcc7b..9198c9a 100644
--- a/v5/ooapi.v5.core.UnitTests/Repositories/NewsItemsRepositoryTests.cs
+++ b/v5/ooapi.v5.core.UnitTests/Repositories/NewsItemsRepositoryTests.cs
@@ -21,7 +21,7 @@ public async Task GetNewsFeed_WhenNewsFeedExists_ReturnsNewsFeed()
.With(x => x.NewsFeedId, newsFeedId)
.Without(x => x.NewsItems)
.Create();
- var newsFeeds = new List { newsFeed }.AsQueryable();
+ var newsFeeds = new List { newsFeed };
var db = newsFeeds.BuildMockDbSet();
var dbContext = Substitute.For();
@@ -44,7 +44,7 @@ public async Task GetNewsFeed_WhenNewsFeedDoesNotFound_ReturnsNull()
.With(x => x.NewsFeedId, newsFeedId)
.Without(x => x.NewsItems)
.Create();
- var newsFeeds = new List { newsFeed }.AsQueryable();
+ var newsFeeds = new List { newsFeed };
var db = newsFeeds.BuildMockDbSet();
var dbContext = Substitute.For();
diff --git a/v5/ooapi.v5.core.UnitTests/Repositories/OrganizationsRepositoryTests.cs b/v5/ooapi.v5.core.UnitTests/Repositories/OrganizationsRepositoryTests.cs
index a10fc98..c10ef47 100644
--- a/v5/ooapi.v5.core.UnitTests/Repositories/OrganizationsRepositoryTests.cs
+++ b/v5/ooapi.v5.core.UnitTests/Repositories/OrganizationsRepositoryTests.cs
@@ -37,7 +37,7 @@ public async Task GetAllOrderedBy_WithDataRequestParameters_ReturnsSet()
.Without(x => x.Parent)
.Without(x => x.Children)
.Create()
- }.AsQueryable();
+ };
var db = organizations.BuildMockDbSet();
var dbContext = Substitute.For();
@@ -64,7 +64,7 @@ public async Task GetOrganization_WhenOrganizationExist_ReturnsOrganization()
.Without(x => x.Parent)
.Without(x => x.Children)
.Create();
- var organizations = new List { organization }.AsQueryable();
+ var organizations = new List { organization };
var db = organizations.BuildMockDbSet();
var dbContext = Substitute.For();
@@ -100,7 +100,7 @@ public async Task GetOrganization_WhenParentRequestedViaRequestParams_ReturnsOrg
.Without(x => x.Parent)
.Without(x => x.Children)
.Create();
- var organizations = new List { organization, parentOrganization }.AsQueryable();
+ var organizations = new List { organization, parentOrganization };
var db = organizations.BuildMockDbSet();
var dbContext = Substitute.For();
@@ -152,7 +152,7 @@ public async Task GetOrganization_WhenChildrenRequestedViaRequestParams_ReturnsO
.Without(x => x.Parent)
.Without(x => x.Children)
.Create();
- var organizations = new List { organization, firstChildOrganization, secondChildOrganization }.AsQueryable();
+ var organizations = new List { organization, firstChildOrganization, secondChildOrganization };
var db = organizations.BuildMockDbSet();
var dbContext = Substitute.For();
diff --git a/v5/ooapi.v5.core.UnitTests/Repositories/PersonRepositoryTests.cs b/v5/ooapi.v5.core.UnitTests/Repositories/PersonRepositoryTests.cs
index fd1f7fb..6e3689f 100644
--- a/v5/ooapi.v5.core.UnitTests/Repositories/PersonRepositoryTests.cs
+++ b/v5/ooapi.v5.core.UnitTests/Repositories/PersonRepositoryTests.cs
@@ -22,7 +22,7 @@ public async Task GetPerson_WhenPersonExists_ReturnsPerson()
.Without(x => x.Address)
.Without(x => x.Groups)
.Create();
- var persons = new List { person }.AsQueryable();
+ var persons = new List { person };
var db = persons.BuildMockDbSet();
var dbContext = Substitute.For();
@@ -46,7 +46,7 @@ public async Task GetPerson_WhenPersonNotFound_ReturnsNull()
.Without(x => x.Address)
.Without(x => x.Groups)
.Create();
- var persons = new List { person }.AsQueryable();
+ var persons = new List { person };
var db = persons.BuildMockDbSet();
var dbContext = Substitute.For();
diff --git a/v5/ooapi.v5.core.UnitTests/Repositories/ProgramOfferingsRepositoryTests.cs b/v5/ooapi.v5.core.UnitTests/Repositories/ProgramOfferingsRepositoryTests.cs
index 38c4cce..5c5263c 100644
--- a/v5/ooapi.v5.core.UnitTests/Repositories/ProgramOfferingsRepositoryTests.cs
+++ b/v5/ooapi.v5.core.UnitTests/Repositories/ProgramOfferingsRepositoryTests.cs
@@ -14,7 +14,7 @@ public class ProgramOfferingsRepositoryTests
private readonly Fixture _fixture = new Fixture();
[Test]
- public async Task GetProgramOffering_WhenProgramOfferingExists_ReturnsProgramOffering()
+ public async Task GetProgramOffering_WhenProgramOfferingExists_ReturnsProgramOffering()
{
// Arrange
var programOfferingId = _fixture.Create();
@@ -27,7 +27,7 @@ public async Task GetProgramOffering_WhenProgramOfferingExists_ReturnsProgramOff
.Without(x => x.Program)
.Without(x => x.PriceInformation)
.Create();
- var programOfferings = new List { programOffering }.AsQueryable();
+ var programOfferings = new List { programOffering };
var db = programOfferings.BuildMockDbSet();
var dbContext = Substitute.For();
@@ -46,7 +46,7 @@ public async Task GetProgramOffering_WhenProgramOfferingDoesNotExist_ReturnsNull
{
// Arrange
var programOfferingId = _fixture.Create();
- var programOfferings = new List { }.AsQueryable();
+ var programOfferings = new List();
var db = programOfferings.BuildMockDbSet();
var dbContext = Substitute.For();
@@ -74,7 +74,7 @@ public async Task GetProgramOfferingByProgramId_WhenProgramOfferingsExist_Return
.Without(x => x.Program)
.Without(x => x.PriceInformation)
.Create();
- var programOfferings = new List { programOffering }.AsQueryable();
+ var programOfferings = new List { programOffering };
var db = programOfferings.BuildMockDbSet();
var dbContext = Substitute.For();
@@ -95,7 +95,7 @@ public async Task GetProgramOfferingByProgramId_WhenProgramOfferingsDoNotExist_R
{
// Arrange
var programId = _fixture.Create();
- var programOfferings = new List { }.AsQueryable();
+ var programOfferings = new List();
var db = programOfferings.BuildMockDbSet();
var dbContext = Substitute.For();
diff --git a/v5/ooapi.v5.core.UnitTests/Repositories/ProgramsRepositoryTests.cs b/v5/ooapi.v5.core.UnitTests/Repositories/ProgramsRepositoryTests.cs
index 18a66e6..be2bb54 100644
--- a/v5/ooapi.v5.core.UnitTests/Repositories/ProgramsRepositoryTests.cs
+++ b/v5/ooapi.v5.core.UnitTests/Repositories/ProgramsRepositoryTests.cs
@@ -52,7 +52,7 @@ public async Task GetAllOrderedBy_WithDataRequestParameters_ReturnsSet()
.Without(x => x.CoordinatorsRef)
.Without(x => x.Organization)
.Create()
- }.AsQueryable();
+ };
var db = programs.BuildMockDbSet();
var dbContext = Substitute.For();
@@ -111,7 +111,7 @@ public async Task GetProgramsByEducationSpecificationId_WithEducationSpecificati
.Without(x => x.CoordinatorsRef)
.Without(x => x.Organization)
.Create()
- }.AsQueryable();
+ };
var db = programs.BuildMockDbSet();
var dbContext = Substitute.For();
@@ -170,7 +170,7 @@ public async Task GetProgramsByOrganizationId_WithOrganizationId_ReturnsSetByOrg
.Without(x => x.CoordinatorsRef)
.Without(x => x.Organization)
.Create()
- }.AsQueryable();
+ };
var db = programs.BuildMockDbSet();
var dbContext = Substitute.For();
@@ -231,7 +231,7 @@ public async Task GetProgramsByProgramId_WithProgramId_ReturnsSetByProgramId()
.Without(x => x.CoordinatorsRef)
.Without(x => x.Organization)
.Create()
- }.AsQueryable();
+ };
var db = programs.BuildMockDbSet();
var dbContext = Substitute.For();
@@ -268,7 +268,7 @@ public async Task GetProgram_WithProgramId_ReturnsProgram()
.Without(x => x.CoordinatorsRef)
.Without(x => x.Organization)
.Create(),
- }.AsQueryable();
+ };
var db = programs.BuildMockDbSet();
var dbContext = Substitute.For();
@@ -314,7 +314,7 @@ public async Task GetProgram_WhenExpandParentRequestedViaRequestParameters_Retur
.Without(x => x.CoordinatorsRef)
.Without(x => x.Organization)
.Create();
- var programs = new List { program, parentProgram }.AsQueryable();
+ var programs = new List { program, parentProgram };
var db = programs.BuildMockDbSet();
var dbContext = Substitute.For();
@@ -382,7 +382,7 @@ public async Task GetProgram_WhenExpandChildrenRequestedViaRequestParameters_Ret
.Without(x => x.CoordinatorsRef)
.Without(x => x.Organization)
.Create();
- var programs = new List { program, firstChildProgram, secondChildProgram }.AsQueryable();
+ var programs = new List { program, firstChildProgram, secondChildProgram };
var db = programs.BuildMockDbSet();
var dbContext = Substitute.For();
@@ -426,7 +426,7 @@ public async Task GetProgram_WhenExpandOrganizationRequestedViaRequestParameters
.Without(x => x.CoordinatorsRef)
.Without(x => x.Organization)
.Create();
- var programs = new List { program }.AsQueryable();
+ var programs = new List { program };
var organization = _fixture.Build()
.With(x => x.OrganizationId, organizationId)
@@ -435,7 +435,7 @@ public async Task GetProgram_WhenExpandOrganizationRequestedViaRequestParameters
.Without(x => x.Parent)
.Without(x => x.Children)
.Create();
- var organizations = new List() { organization }.AsQueryable();
+ var organizations = new List() { organization };
var db = programs.BuildMockDbSet();
var orgDb = organizations.BuildMockDbSet();
@@ -477,7 +477,7 @@ public async Task GetProgram_WhenExpandEducationSpecificationRequestedViaRequest
.Without(x => x.CoordinatorsRef)
.Without(x => x.Organization)
.Create();
- var programs = new List { program }.AsQueryable();
+ var programs = new List { program };
var educationSpecification = _fixture.Build()
.With(x => x.EducationSpecificationId, educationSpecificationId)
@@ -486,7 +486,7 @@ public async Task GetProgram_WhenExpandEducationSpecificationRequestedViaRequest
.Without(x => x.Children)
.Without(x => x.Organization)
.Create();
- var educationSpecifications = new List() { educationSpecification }.AsQueryable();
+ var educationSpecifications = new List() { educationSpecification };
var db = programs.BuildMockDbSet();
var eduDb = educationSpecifications.BuildMockDbSet();
diff --git a/v5/ooapi.v5.core.UnitTests/Repositories/RoomsRepositoryTests.cs b/v5/ooapi.v5.core.UnitTests/Repositories/RoomsRepositoryTests.cs
index 6b6fb09..9058c01 100644
--- a/v5/ooapi.v5.core.UnitTests/Repositories/RoomsRepositoryTests.cs
+++ b/v5/ooapi.v5.core.UnitTests/Repositories/RoomsRepositoryTests.cs
@@ -1,4 +1,5 @@
using AutoFixture;
+using MockQueryable;
using MockQueryable.NSubstitute;
using NSubstitute;
using NUnit.Framework.Legacy;
@@ -27,7 +28,7 @@ public async Task GetRoom_WhenRoomExists_ReturnsRoom()
.Without(x => x.description)
.Without(x => x.Building)
.CreateMany(1)
- .AsQueryable();
+ .ToList();
var db = room.BuildMockDbSet();
dbContext.Rooms.Returns(db);
@@ -52,7 +53,7 @@ public async Task GetRoom_WhenRoomDoesNotExist_ReturnsNull()
.Without(x => x.description)
.Without(x => x.Building)
.CreateMany(5)
- .AsQueryable();
+ .ToList();
var db = rooms.BuildMockDbSet();
dbContext.Rooms.Returns(db);
@@ -77,7 +78,7 @@ public async Task GetRoomsByPersonId_WhenRoomsExist_ReturnsRooms()
.Without(x => x.description)
.Without(x => x.Building)
.CreateMany(5)
- .AsQueryable();
+ .ToList();
var db = rooms.BuildMockDbSet();
dbContext.Rooms.Returns(db);
@@ -104,7 +105,7 @@ public async Task GetRoomsByPersonId_WhenRoomsDoNotExist_ReturnsEmptyList()
.Without(x => x.description)
.Without(x => x.Building)
.CreateMany(5)
- .AsQueryable();
+ .ToList();
var db = rooms.BuildMockDbSet();
dbContext.Rooms.Returns(db);
diff --git a/v5/ooapi.v5.core.UnitTests/Repositories/ServiceMetadataRepositoryTests.cs b/v5/ooapi.v5.core.UnitTests/Repositories/ServiceMetadataRepositoryTests.cs
index c98dd02..94e53ff 100644
--- a/v5/ooapi.v5.core.UnitTests/Repositories/ServiceMetadataRepositoryTests.cs
+++ b/v5/ooapi.v5.core.UnitTests/Repositories/ServiceMetadataRepositoryTests.cs
@@ -1,4 +1,5 @@
using AutoFixture;
+using MockQueryable;
using MockQueryable.NSubstitute;
using NSubstitute;
using ooapi.v5.core.Repositories;
@@ -20,7 +21,7 @@ public async Task GetServiceMetadata_WhenServiceExists_ReturnsService()
var serviceMetadataRepository = new ServiceMetadataRepository(dbContext);
var services = _fixture.Build()
.CreateMany(4)
- .AsQueryable();
+ .ToList();
var db = services.BuildMockDbSet();
dbContext.Services.Returns(db);
diff --git a/v5/ooapi.v5.core.UnitTests/Security/UserRequestContextTests.cs b/v5/ooapi.v5.core.UnitTests/Security/UserRequestContextTests.cs
index 194f0ad..ce14ba7 100644
--- a/v5/ooapi.v5.core.UnitTests/Security/UserRequestContextTests.cs
+++ b/v5/ooapi.v5.core.UnitTests/Security/UserRequestContextTests.cs
@@ -1,5 +1,5 @@
using AutoFixture;
-using FluentAssertions;
+using AwesomeAssertions;
using Microsoft.AspNetCore.Http;
using NSubstitute;
using ooapi.v5.core.Security;
diff --git a/v5/ooapi.v5.core.UnitTests/Services/OrganizationsServiceTests.cs b/v5/ooapi.v5.core.UnitTests/Services/OrganizationsServiceTests.cs
index 2f9bfe0..362239d 100644
--- a/v5/ooapi.v5.core.UnitTests/Services/OrganizationsServiceTests.cs
+++ b/v5/ooapi.v5.core.UnitTests/Services/OrganizationsServiceTests.cs
@@ -38,8 +38,9 @@ public async Task GetAll_CallsRepository()
.Without(x => x.Addresses)
.Without(x => x.Parent)
.Without(x => x.Children)
- .CreateMany(5);
- var db = organizations.AsQueryable().BuildMockDbSet();
+ .CreateMany(5)
+ .ToList();
+ var db = organizations.BuildMockDbSet();
var expected = await Pagination.CreateAsync(db, dataRequestParameters);
repository.GetAllOrderedByAsync(dataRequestParameters).Returns(expected);
diff --git a/v5/ooapi.v5.core.UnitTests/Utility/FilterHelperTests.cs b/v5/ooapi.v5.core.UnitTests/Utility/FilterHelperTests.cs
index 8f002b2..7e44472 100644
--- a/v5/ooapi.v5.core.UnitTests/Utility/FilterHelperTests.cs
+++ b/v5/ooapi.v5.core.UnitTests/Utility/FilterHelperTests.cs
@@ -1,4 +1,4 @@
-using FluentAssertions;
+using AwesomeAssertions;
using ooapi.v5.core.Utility;
namespace ooapi.v5.core.UnitTests.Utility;
diff --git a/v5/ooapi.v5.core.UnitTests/Utility/FilterTests.cs b/v5/ooapi.v5.core.UnitTests/Utility/FilterTests.cs
index e451fe0..e8c67ea 100644
--- a/v5/ooapi.v5.core.UnitTests/Utility/FilterTests.cs
+++ b/v5/ooapi.v5.core.UnitTests/Utility/FilterTests.cs
@@ -1,5 +1,5 @@
using AutoFixture;
-using FluentAssertions;
+using AwesomeAssertions;
using ooapi.v5.core.Utility;
namespace ooapi.v5.core.UnitTests.Utility;
diff --git a/v5/ooapi.v5.core.UnitTests/Utility/FilterToLinqTests.cs b/v5/ooapi.v5.core.UnitTests/Utility/FilterToLinqTests.cs
index d6ffd45..79090be 100644
--- a/v5/ooapi.v5.core.UnitTests/Utility/FilterToLinqTests.cs
+++ b/v5/ooapi.v5.core.UnitTests/Utility/FilterToLinqTests.cs
@@ -1,5 +1,5 @@
using AutoFixture;
-using FluentAssertions;
+using AwesomeAssertions;
using ooapi.v5.core.Utility;
namespace ooapi.v5.core.UnitTests.Utility;
diff --git a/v5/ooapi.v5.core.UnitTests/Utility/OrderedQueryableTests.cs b/v5/ooapi.v5.core.UnitTests/Utility/OrderedQueryableTests.cs
index ef8127e..9e11d36 100644
--- a/v5/ooapi.v5.core.UnitTests/Utility/OrderedQueryableTests.cs
+++ b/v5/ooapi.v5.core.UnitTests/Utility/OrderedQueryableTests.cs
@@ -1,4 +1,4 @@
-using FluentAssertions;
+using AwesomeAssertions;
using Microsoft.AspNetCore.Mvc.Formatters;
using ooapi.v5.Attributes;
using ooapi.v5.core.Utility;
diff --git a/v5/ooapi.v5.core.UnitTests/ooapi.v5.core.UnitTests.csproj b/v5/ooapi.v5.core.UnitTests/ooapi.v5.core.UnitTests.csproj
index 606f5f3..6fd2fa6 100644
--- a/v5/ooapi.v5.core.UnitTests/ooapi.v5.core.UnitTests.csproj
+++ b/v5/ooapi.v5.core.UnitTests/ooapi.v5.core.UnitTests.csproj
@@ -1,28 +1,26 @@
- net8.0
enable
- enable
false
true
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
-
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
-
+
diff --git a/v5/ooapi.v5.core/Extensions/EnumerableExtensions.cs b/v5/ooapi.v5.core/Extensions/EnumerableExtensions.cs
new file mode 100644
index 0000000..ce34d8b
--- /dev/null
+++ b/v5/ooapi.v5.core/Extensions/EnumerableExtensions.cs
@@ -0,0 +1,9 @@
+namespace ooapi.v5.core.Extensions;
+
+public static class EnumerableExtensions
+{
+ public static bool IsNullOrEmpty(this IEnumerable? enumerable)
+ {
+ return enumerable == null || !enumerable.Any();
+ }
+}
diff --git a/v5/ooapi.v5.core/Extensions/LanguageTypedPropertyExtensions.cs b/v5/ooapi.v5.core/Extensions/LanguageTypedPropertyExtensions.cs
index 524f89b..dd8cc48 100644
--- a/v5/ooapi.v5.core/Extensions/LanguageTypedPropertyExtensions.cs
+++ b/v5/ooapi.v5.core/Extensions/LanguageTypedPropertyExtensions.cs
@@ -1,10 +1,4 @@
-using Microsoft.CodeAnalysis.CSharp.Syntax;
-using ooapi.v5.Models;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
+using ooapi.v5.Models;
namespace ooapi.v5.core.Extensions
{
diff --git a/v5/ooapi.v5.core/Helpers/ListOneOfConverter.cs b/v5/ooapi.v5.core/Helpers/ListOneOfConverter.cs
index 5c15d56..41b1605 100644
--- a/v5/ooapi.v5.core/Helpers/ListOneOfConverter.cs
+++ b/v5/ooapi.v5.core/Helpers/ListOneOfConverter.cs
@@ -1,6 +1,7 @@
using Microsoft.IdentityModel.Tokens;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
+using ooapi.v5.core.Extensions;
namespace ooapi.v5.Helpers;
diff --git a/v5/ooapi.v5.core/Helpers/OneOfConverter.cs b/v5/ooapi.v5.core/Helpers/OneOfConverter.cs
index 49c33b6..9a8e8d1 100644
--- a/v5/ooapi.v5.core/Helpers/OneOfConverter.cs
+++ b/v5/ooapi.v5.core/Helpers/OneOfConverter.cs
@@ -1,6 +1,7 @@
using Microsoft.IdentityModel.Tokens;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
+using ooapi.v5.core.Extensions;
namespace ooapi.v5.Helpers;
@@ -31,7 +32,6 @@ public override void WriteJson(JsonWriter writer, object? value, JsonSerializer
var resultId = "";
foreach (var prop in properties)
{
-
if (prop.Name != "Id" && !prop.Value.IsNullOrEmpty())
{
jToken = prop.Value;
diff --git a/v5/ooapi.v5.core/Migrations/20240426143718_AddedConsumerAndAttributeColumnForOffering.Designer.cs b/v5/ooapi.v5.core/Migrations/20240426143718_AddedConsumerAndAttributeColumnForOffering.Designer.cs
new file mode 100644
index 0000000..f51f289
--- /dev/null
+++ b/v5/ooapi.v5.core/Migrations/20240426143718_AddedConsumerAndAttributeColumnForOffering.Designer.cs
@@ -0,0 +1,2812 @@
+//
+using System;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Metadata;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+using ooapi.v5.core.Repositories;
+
+#nullable disable
+
+namespace ooapi.v5.core.Migrations
+{
+ [DbContext(typeof(CoreDBContext))]
+ [Migration("20240426143718_AddedConsumerAndAttributeColumnForOffering")]
+ partial class AddedConsumerAndAttributeColumnForOffering
+ {
+ ///
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder
+ .HasDefaultSchema("ooapiv5")
+ .HasAnnotation("ProductVersion", "8.0.0")
+ .HasAnnotation("Relational:MaxIdentifierLength", 128);
+
+ SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
+
+ modelBuilder.Entity("AddressComponent", b =>
+ {
+ b.Property("AddressId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ComponentsComponentId")
+ .HasColumnType("uniqueidentifier");
+
+ b.HasKey("AddressId", "ComponentsComponentId");
+
+ b.HasIndex("ComponentsComponentId");
+
+ b.ToTable("AddressComponent", "ooapiv5");
+ });
+
+ modelBuilder.Entity("AddressComponentOffering", b =>
+ {
+ b.Property("AddressId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ComponentOfferingsOfferingId")
+ .HasColumnType("uniqueidentifier");
+
+ b.HasKey("AddressId", "ComponentOfferingsOfferingId");
+
+ b.HasIndex("ComponentOfferingsOfferingId");
+
+ b.ToTable("AddressComponentOffering", "ooapiv5");
+ });
+
+ modelBuilder.Entity("AddressCourse", b =>
+ {
+ b.Property("AddressId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("CoursesCourseId")
+ .HasColumnType("uniqueidentifier");
+
+ b.HasKey("AddressId", "CoursesCourseId");
+
+ b.HasIndex("CoursesCourseId");
+
+ b.ToTable("AddressCourse", "ooapiv5");
+ });
+
+ modelBuilder.Entity("AddressCourseOffering", b =>
+ {
+ b.Property("AddressId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("CourseOfferingsOfferingId")
+ .HasColumnType("uniqueidentifier");
+
+ b.HasKey("AddressId", "CourseOfferingsOfferingId");
+
+ b.HasIndex("CourseOfferingsOfferingId");
+
+ b.ToTable("AddressCourseOffering", "ooapiv5");
+ });
+
+ modelBuilder.Entity("AddressOrganization", b =>
+ {
+ b.Property("AddressId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("OrganizationsOrganizationId")
+ .HasColumnType("uniqueidentifier");
+
+ b.HasKey("AddressId", "OrganizationsOrganizationId");
+
+ b.HasIndex("OrganizationsOrganizationId");
+
+ b.ToTable("AddressOrganization", "ooapiv5");
+ });
+
+ modelBuilder.Entity("AddressProgram", b =>
+ {
+ b.Property("AddressId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ProgramsProgramId")
+ .HasColumnType("uniqueidentifier");
+
+ b.HasKey("AddressId", "ProgramsProgramId");
+
+ b.HasIndex("ProgramsProgramId");
+
+ b.ToTable("AddressProgram", "ooapiv5");
+ });
+
+ modelBuilder.Entity("AddressProgramOffering", b =>
+ {
+ b.Property("AddressId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ProgramOfferingsOfferingId")
+ .HasColumnType("uniqueidentifier");
+
+ b.HasKey("AddressId", "ProgramOfferingsOfferingId");
+
+ b.HasIndex("ProgramOfferingsOfferingId");
+
+ b.ToTable("AddressProgramOffering", "ooapiv5");
+ });
+
+ modelBuilder.Entity("ComponentOfferingCost", b =>
+ {
+ b.Property("ComponentOfferingsOfferingId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("CostsCostId")
+ .HasColumnType("uniqueidentifier");
+
+ b.HasKey("ComponentOfferingsOfferingId", "CostsCostId");
+
+ b.HasIndex("CostsCostId");
+
+ b.ToTable("ComponentOfferingCost", "ooapiv5");
+ });
+
+ modelBuilder.Entity("CostCourseOffering", b =>
+ {
+ b.Property("CostsCostId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("CourseOfferingsOfferingId")
+ .HasColumnType("uniqueidentifier");
+
+ b.HasKey("CostsCostId", "CourseOfferingsOfferingId");
+
+ b.HasIndex("CourseOfferingsOfferingId");
+
+ b.ToTable("CostCourseOffering", "ooapiv5");
+ });
+
+ modelBuilder.Entity("CostProgramOffering", b =>
+ {
+ b.Property("CostsCostId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ProgramOfferingsOfferingId")
+ .HasColumnType("uniqueidentifier");
+
+ b.HasKey("CostsCostId", "ProgramOfferingsOfferingId");
+
+ b.HasIndex("ProgramOfferingsOfferingId");
+
+ b.ToTable("CostProgramOffering", "ooapiv5");
+ });
+
+ modelBuilder.Entity("GroupPerson", b =>
+ {
+ b.Property("GroupsGroupId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("PersonsPersonId")
+ .HasColumnType("uniqueidentifier");
+
+ b.HasKey("GroupsGroupId", "PersonsPersonId");
+
+ b.HasIndex("PersonsPersonId");
+
+ b.ToTable("GroupPerson", "ooapiv5");
+ });
+
+ modelBuilder.Entity("NewsFeedNewsItem", b =>
+ {
+ b.Property("NewsFeedsNewsFeedId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("NewsItemsNewsItemId")
+ .HasColumnType("uniqueidentifier");
+
+ b.HasKey("NewsFeedsNewsFeedId", "NewsItemsNewsItemId");
+
+ b.HasIndex("NewsItemsNewsItemId");
+
+ b.ToTable("NewsFeedNewsItem", "ooapiv5");
+ });
+
+ modelBuilder.Entity("ooapi.v5.Models.AcademicSession", b =>
+ {
+ b.Property("AcademicSessionId")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("AcademicSessionType")
+ .HasColumnType("int");
+
+ b.Property("EndDate")
+ .HasColumnType("datetime2");
+
+ b.Property("Extension")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("ParentId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("PrimaryCode")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("PrimaryCodeType")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("StartDate")
+ .HasColumnType("datetime2");
+
+ b.Property("YearId")
+ .HasColumnType("uniqueidentifier");
+
+ b.HasKey("AcademicSessionId");
+
+ b.ToTable("AcademicSessions", "ooapiv5");
+ });
+
+ modelBuilder.Entity("ooapi.v5.Models.Address", b =>
+ {
+ b.Property("AddressId")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("AddressType")
+ .HasColumnType("int");
+
+ b.Property("City")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property