Skip to content

SkillsFundingAgency/das-apprentice-feedback-api

Repository files navigation

⛔Never push sensitive information such as client id's, secrets or keys into repositories including in the README file⛔

Apprentice Feedback API

UK Government logo

Build Status Quality Gate Status Jira Project Confluence Project License

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.

Developer Setup

Requirements

In order to run this solution locally you will need the following:

Environment setup

  • 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"
  }
}

Running

  • 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 UI das-apprentice-feedback-web codebase for the UI journey.

Tests

This codebase includes unit tests and integration tests. These are all in seperate projects aptly named and kept in the 'Tests' folder.

Unit Tests

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

Integration Tests

There is one integration test project, SFA.DAS.ApprenticeFeedback.Api.IntegrationTests, and it tests the APIs.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published