Лабораторная работа 2. Изменен порядок выполнения тестов (SetUp на TearDown)

This commit is contained in:
Есения Андрианова 2025-02-18 19:50:15 +04:00
parent 1789fc17d1
commit 3978ab3287
8 changed files with 22 additions and 27 deletions

View File

@ -20,8 +20,8 @@ internal class BuyerBusinessLogicContractTests
_buyerBusinessLogicContract = new BuyerBusinessLogicContract(_buyerStorageContract.Object, new Mock<ILogger>().Object); _buyerBusinessLogicContract = new BuyerBusinessLogicContract(_buyerStorageContract.Object, new Mock<ILogger>().Object);
} }
[SetUp] [TearDown]
public void SetUp() public void TearDown()
{ {
_buyerStorageContract.Reset(); _buyerStorageContract.Reset();
} }

View File

@ -26,8 +26,8 @@ namespace NorthBridgeTest.BusinessLogicsContractsTests
_componentBusinessLogicContract = new ComponentBusinessLogicContract(_componentStorageContract.Object, new Mock<ILogger>().Object); _componentBusinessLogicContract = new ComponentBusinessLogicContract(_componentStorageContract.Object, new Mock<ILogger>().Object);
} }
[SetUp] [TearDown]
public void SetUp() public void TearDown()
{ {
_componentStorageContract.Reset(); _componentStorageContract.Reset();
} }

View File

@ -20,8 +20,8 @@ internal class ManufacturerBusinessLogicContractTests
_manufacturerBusinessLogicContract = new ManufacturerBusinessLogicContract(_manufacturerStorageContract.Object, new Mock<ILogger>().Object); _manufacturerBusinessLogicContract = new ManufacturerBusinessLogicContract(_manufacturerStorageContract.Object, new Mock<ILogger>().Object);
} }
[SetUp] [TearDown]
public void SetUp() public void TearDown()
{ {
_manufacturerStorageContract.Reset(); _manufacturerStorageContract.Reset();
} }

View File

@ -21,8 +21,8 @@ internal class PostBusinessLogicContractTests
_postBusinessLogicContract = new PostBusinessLogicContract(_postStorageContract.Object, new Mock<ILogger>().Object); _postBusinessLogicContract = new PostBusinessLogicContract(_postStorageContract.Object, new Mock<ILogger>().Object);
} }
[SetUp] [TearDown]
public void SetUp() public void TearDown()
{ {
_postStorageContract.Reset(); _postStorageContract.Reset();
} }

View File

@ -4,11 +4,6 @@ using NorthBridgeBusinessLogic.Implementations;
using NorthBridgeContract.DataModels; using NorthBridgeContract.DataModels;
using NorthBridgeContract.Enums; using NorthBridgeContract.Enums;
using NorthBridgeContract.StoragesContracts; using NorthBridgeContract.StoragesContracts;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace NorthBridgeTest.BusinessLogicsContractsTests namespace NorthBridgeTest.BusinessLogicsContractsTests
{ {
@ -27,8 +22,8 @@ namespace NorthBridgeTest.BusinessLogicsContractsTests
_productBusinessLogicContract = new ProductBusinessLogicContract(_productStorageContract.Object, _logger.Object); _productBusinessLogicContract = new ProductBusinessLogicContract(_productStorageContract.Object, _logger.Object);
} }
[SetUp] [TearDown]
public void SetUp() public void TearDown()
{ {
_productStorageContract.Reset(); _productStorageContract.Reset();
} }

View File

@ -28,8 +28,8 @@ internal class SalaryBusinessLogicContractTests
_saleStorageContract.Object, _postStorageContract.Object, _workerStorageContract.Object, new Mock<ILogger>().Object); _saleStorageContract.Object, _postStorageContract.Object, _workerStorageContract.Object, new Mock<ILogger>().Object);
} }
[SetUp] [TearDown]
public void SetUp() public void TearDown()
{ {
_salaryStorageContract.Reset(); _salaryStorageContract.Reset();
_saleStorageContract.Reset(); _saleStorageContract.Reset();

View File

@ -21,8 +21,8 @@ internal class SaleBusinessLogicContractTests
_saleBusinessLogicContract = new SaleBusinessLogicContract(_saleStorageContract.Object, new Mock<ILogger>().Object); _saleBusinessLogicContract = new SaleBusinessLogicContract(_saleStorageContract.Object, new Mock<ILogger>().Object);
} }
[SetUp] [TearDown]
public void SetUp() public void TearDown()
{ {
_saleStorageContract.Reset(); _saleStorageContract.Reset();
} }

View File

@ -20,8 +20,8 @@ internal class WorkerBusinessLogicContractTests
_workerBusinessLogicContract = new WorkerBusinessLogicContract(_workerStorageContract.Object, new Mock<ILogger>().Object); _workerBusinessLogicContract = new WorkerBusinessLogicContract(_workerStorageContract.Object, new Mock<ILogger>().Object);
} }
[SetUp] [TearDown]
public void SetUp() public void TearDown()
{ {
_workerStorageContract.Reset(); _workerStorageContract.Reset();
} }