From 05a042f552a5d3af780df317c28c7d7ea669f894 Mon Sep 17 00:00:00 2001 From: StevanFreeborn Date: Mon, 11 Jul 2022 09:23:06 -0500 Subject: [PATCH] added unit and integration test classes for quotes controller --- .../QuotesControllerIntegrationTests.cs | 22 +++++++++++++++++++ .../v1/unitTests/QuotesControllerUnitTests.cs | 18 +++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 server.tests/v1/integrationTests/QuotesControllerIntegrationTests.cs create mode 100644 server.tests/v1/unitTests/QuotesControllerUnitTests.cs diff --git a/server.tests/v1/integrationTests/QuotesControllerIntegrationTests.cs b/server.tests/v1/integrationTests/QuotesControllerIntegrationTests.cs new file mode 100644 index 0000000..bdaa319 --- /dev/null +++ b/server.tests/v1/integrationTests/QuotesControllerIntegrationTests.cs @@ -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"; + } + } +} diff --git a/server.tests/v1/unitTests/QuotesControllerUnitTests.cs b/server.tests/v1/unitTests/QuotesControllerUnitTests.cs new file mode 100644 index 0000000..8d02a3f --- /dev/null +++ b/server.tests/v1/unitTests/QuotesControllerUnitTests.cs @@ -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 _mockRepo; + private readonly QuotesController _controller; + + public QuotesControllerUnitTests() + { + _mockRepo = new Mock(); + _controller = new QuotesController(_mockRepo.Object); + } + } +}