finished writing tests for episodes controller. started writing tests for seasons controller. add http client factory class for integration tests

This commit is contained in:
StevanFreeborn
2022-07-08 16:32:25 -05:00
parent 5985d5d9fc
commit 16fe8039bb
11 changed files with 740 additions and 333 deletions
@@ -0,0 +1,49 @@
using Moq;
using server.Controllers.v1;
using server.Persistence.Repositories;
using System.Runtime.CompilerServices;
namespace server.tests.v1.unitTests
{
public class SeasonsControllerUnitTests
{
private readonly Mock<ISeasonRepository> _mockRepo;
private readonly SeasonsController _controller;
public SeasonsControllerUnitTests()
{
_mockRepo = new Mock<ISeasonRepository>();
_controller = new SeasonsController(_mockRepo.Object);
}
[Fact]
public async Task GetSeasonsAsync_AllSeasons_Returns200StatusCodeWithSeasonsCollection()
{
throw new NotImplementedException();
}
[Fact]
public async Task GetSeasonsAsync_RepoThrowsException_Returns500StatusCodeWithProblemDetails()
{
throw new NotImplementedException();
}
[Fact]
public async Task GetSeasonByNumberAsync_ValidSeasonNumber_Returns200StatusCodeWithSeason()
{
throw new NotImplementedException();
}
[Fact]
public async Task GetSeasonByNumberAsync_ValidSeasonNumberForNonExistentSeason_Returns404StatusCodeWithProblemDetails()
{
throw new NotImplementedException();
}
[Fact]
public async Task GetSeasonByNumberAsync_RepoThrowsException_Returns500StatusCodeWithProblemDetails()
{
throw new NotImplementedException();
}
}
}