From 8c75e5a59d91ff78b30526ec27c74672bcefc73e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kamil=20B=C4=85czek?= <74410956+kamilbaczek@users.noreply.github.com> Date: Sat, 26 Oct 2024 18:58:15 +0200 Subject: [PATCH] refactor: remove unessery usings --- .../SignContract/SignContractTests.cs | 9 ++-- .../Src/docker-compose copy.yml | 49 ------------------- 2 files changed, 5 insertions(+), 53 deletions(-) delete mode 100644 Chapter-4-applying-tactical-domain-driven-design/Fitnet.Contracts/Src/docker-compose copy.yml diff --git a/Chapter-4-applying-tactical-domain-driven-design/Fitnet.Contracts/Src/Fitnet.Contracts.Core.UnitTests/SignContract/SignContractTests.cs b/Chapter-4-applying-tactical-domain-driven-design/Fitnet.Contracts/Src/Fitnet.Contracts.Core.UnitTests/SignContract/SignContractTests.cs index 08fe65a1..abb4bdb0 100644 --- a/Chapter-4-applying-tactical-domain-driven-design/Fitnet.Contracts/Src/Fitnet.Contracts.Core.UnitTests/SignContract/SignContractTests.cs +++ b/Chapter-4-applying-tactical-domain-driven-design/Fitnet.Contracts/Src/Fitnet.Contracts.Core.UnitTests/SignContract/SignContractTests.cs @@ -3,10 +3,11 @@ namespace EvolutionaryArchitecture.Fitnet.Contracts.Core.UnitTests.SignContract; using Common; using Common.Builders; using Core.SignContract; +using Core.SignContract.Signatures; public sealed class SignContractTests { - private const string Signature = "John Doe"; + private const string SignatureValue = "John Doe"; [Theory] [ClassData(typeof(SignContractTestData))] @@ -20,7 +21,7 @@ internal void Given_sign_contract_Then_expiration_date_is_set_to_contract_durati Contract contract = ContractBuilder .Prepared() .PreparedAt(preparedAt); - var signature = Core.SignContract.Signatures.Signature.From(signedAt, Signature); + var signature = Signature.From(signedAt, SignatureValue); // Act var signResult = contract.Sign(signature, fakeNow); @@ -39,10 +40,10 @@ internal void Given_sign_contract_Then_contracts_becomes_binding_contract() // Arrange Contract contract = ContractBuilder .Prepared(); - var digitalSignature = Core.SignContract.Signatures.Signature.From(SignedAt, Signature); + var signature = Signature.From(SignedAt, SignatureValue); // Act - var signResult = contract.Sign(digitalSignature, FakeNow); + var signResult = contract.Sign(signature, FakeNow); // Assert var @event = signResult.Value.GetPublishedEvent(); diff --git a/Chapter-4-applying-tactical-domain-driven-design/Fitnet.Contracts/Src/docker-compose copy.yml b/Chapter-4-applying-tactical-domain-driven-design/Fitnet.Contracts/Src/docker-compose copy.yml deleted file mode 100644 index e4d4d441..00000000 --- a/Chapter-4-applying-tactical-domain-driven-design/Fitnet.Contracts/Src/docker-compose copy.yml +++ /dev/null @@ -1,49 +0,0 @@ -version: '3.9' - -services: - fitnet-modular-monolith: - environment: - - ASPNETCORE_ENVIRONMENT=Development - build: ./Fitnet/Src - ports: - - "8080:80" - depends_on: - postgres: - condition: service_healthy - rabbitmq: - condition: service_healthy - - fitnet-contracts-microservice: - environment: - - ASPNETCORE_ENVIRONMENT=Development - build: ./Fitnet.Contracts/Src - ports: - - "8081:80" - depends_on: - postgres: - condition: service_healthy - - postgres: - image: postgres:14.3 - container_name: postgres-fitnet - ports: - - 5432:5432 - environment: - - POSTGRES_PASSWORD=mysecretpassword - healthcheck: - test: [ "CMD-SHELL", "pg_isready -U postgres" ] - interval: 10s - timeout: 5s - retries: 5 - - rabbitmq: - container_name: rabbitmq-fitnet - image: rabbitmq:management - ports: - - "15672:15672" - - "5672:5672" - healthcheck: - test: ["CMD", "rabbitmqctl", "ping"] - interval: 10s - timeout: 5s - retries: 5 \ No newline at end of file