added unit and integration test classes for quotes controller
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user