added unit and integration test classes for quotes controller

This commit is contained in:
StevanFreeborn
2022-07-11 09:23:06 -05:00
parent bd78272a30
commit 05a042f552
2 changed files with 40 additions and 0 deletions
@@ -0,0 +1,22 @@
using server.tests.Http;
using server.tests.Options;
using System.Text.Json;
namespace server.tests.v1.integrationTests
{
public class QuotesControllerIntegrationTests
{
private readonly HttpClient _client;
private readonly JsonSerializerOptions _serializerOptions;
private readonly string _endpoint;
public QuotesControllerIntegrationTests()
{
_client = HttpClientFactory.GetHttpClient(1);
_serializerOptions = OptionsFactory.GetJsonSerializerOptions();
_endpoint = "/api/seasons";
}
}
}
@@ -0,0 +1,18 @@
using Moq;
using server.Controllers.v1;
using server.Persistence.Repositories;
namespace server.tests.v1.unitTests
{
public class QuotesControllerUnitTests
{
private readonly Mock<IQuoteRepository> _mockRepo;
private readonly QuotesController _controller;
public QuotesControllerUnitTests()
{
_mockRepo = new Mock<IQuoteRepository>();
_controller = new QuotesController(_mockRepo.Object);
}
}
}