⛔Never push sensitive information such as client id's, secrets or keys into repositories including in the README file⛔
This repository represents the Apprentice Feedback API code base. Apprentice Feedback is a service that allows apprentices to provide feedback on their training providers. The apprentice is able to submit feedback via the ad hoc journey, or an emailing journey. Either way, the UI code base is the das-apprentice-feedback-web
repository, this repository is the inner API, and the outer API code base is in the das-apim-endpoints
repository within the ApprenticeFeedback
project.
In order to run this solution locally you will need the following:
- .NET Core SDK >= 3.1
- (VS Code Only) C# Extension
- SQL Server Express LocalDB
- Azurite (previously known as Azure Storage Emulator)
- Database - Publish the local database from the
SFA.DAS.ApprenticeFeedback.Database
project. - appsettings.development.json file - Add the following to an
appsettings.development.json
file.
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information"
}
},
"AllowedHosts": "*",
"ConfigurationStorageConnectionString": "UseDevelopmentStorage=true",
"ConfigNames": "SFA.DAS.ApprenticeFeedback.Api",
"EnvironmentName": "LOCAL",
"Version": "1.0"
}
- Azure Table Storage Config - Add the following data to your Azure Table Storage Config.
Row Key: SFA.DAS.ApprenticeFeedback.Api_1.0
Partition Key: LOCAL
Data:
{
"ApplicationSettings": {
"DbConnectionString": "Data Source=HOSTNAME;Initial Catalog=SFA.DAS.ApprenticeFeedback.Database;Integrated Security=True;Pooling=False;Connect Timeout=30",
"NServiceBusConnectionString": "UseLearningEndpoint=true",
"NServiceBusLicense": "",
"InitialDenyPeriodDays": 92,
"FinalAllowedPeriodDays": 61,
"RecentDenyPeriodDays": 14,
"MinimumActiveApprenticeshipCount": 10,
"ReportingFeedbackCutoffMonths": 12,
"ReportingMinNumberOfResponses": 1
},
"AzureAd": {
"tenant": "TENANT.onmicrosoft.com",
"identifier": "https://IDENTIFIER.onmicrosoft.com/ENVIRONMENT"
}
}
- Start Azurite e.g. using a command
C:\Program Files (x86)\Microsoft SDKs\Azure\Storage Emulator>AzureStorageEmulator.exe start
- Run the solution
- NB: You may need other applications running in conjuntion with this, such as the backend API
das-apim-endpoints/ApprenticeFeedback
project and also the UIdas-apprentice-feedback-web
codebase for the UI journey.
This codebase includes unit tests and integration tests. These are all in seperate projects aptly named and kept in the 'Tests' folder.
There are several unit test projects in the solution built using C#, NUnit, Moq, FluentAssertions, .NET and AutoFixture.
SFA.DAS.ApprenticeFeedback.Api.UnitTests
SFA.DAS.ApprenticeFeedback.Application.UnitTests
SFA.DAS.ApprenticeFeedback.Data.UnitTests
SFA.DAS.ApprenticeFeedback.Domain.UnitTests
There is one integration test project, SFA.DAS.ApprenticeFeedback.Api.IntegrationTests
, and it tests the APIs.