Kays
Kays
CC#
Created by Kays on 4/24/2023 in #help
❔ Confused about one of my Unit Testing
Up
10 replies
CC#
Created by Kays on 4/23/2023 in #help
❔ C# - How to set up hexagonal architecture in a c# project using TDD
Someone for a review ? Smadge
21 replies
CC#
Created by PatrickG on 4/24/2023 in #help
❔ feedback on clientside api request limiter
Maybe using  AspNetCoreRateLimit nugget package, and add configurations into your Program.cs could be a better solution. Search for it, there is a lot documentation
13 replies
CC#
Created by Temptica on 4/24/2023 in #help
❔ Docker file for Multi-layered project
Solution Structure : - Project.API - .... - Project.API.csproj - Project.Library - .... - Project.Library.csproj -Dockerfile
61 replies
CC#
Created by Temptica on 4/24/2023 in #help
❔ Docker file for Multi-layered project
. . The dockerfile is in the root of my solution with projects
61 replies
CC#
Created by Temptica on 4/24/2023 in #help
❔ Docker file for Multi-layered project
The following Dockerfile is working fine for me : FROM mcr.microsoft.com/dotnet/aspnet:7.0.2-jammy AS base WORKDIR /app EXPOSE 80 EXPOSE 443 FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build WORKDIR /src COPY ["Project.API/Project.API.csproj", "Project.API/"] COPY ["Project.Library/Project.Library.csproj", "Project.Library/"] RUN dotnet restore "Project.API/Project.API.csproj" COPY . . WORKDIR "/src/Project.API" RUN dotnet build "Project.API.csproj" -c Release -o /app FROM build AS publish RUN dotnet publish "ProjectAPI.csproj" -c Release -o /app FROM base AS final WORKDIR /app COPY --from=publish /app . ENTRYPOINT ["dotnet", "Project.API.dll"]
61 replies
CC#
Created by Temptica on 4/24/2023 in #help
❔ Docker file for Multi-layered project
Well that's true. publish folder harold
61 replies
CC#
Created by Temptica on 4/24/2023 in #help
❔ Docker file for Multi-layered project
Hi, Did you generate the Dockerfile with your IDE or did u create it in your own ?
61 replies
CC#
Created by Kays on 4/23/2023 in #help
❔ C# - How to set up hexagonal architecture in a c# project using TDD
Now I'm stuck harold
21 replies
CC#
Created by Kays on 4/23/2023 in #help
❔ C# - How to set up hexagonal architecture in a c# project using TDD
Here the git folder of what I've been doing so far. You will find the subject in a README.md file. : https://github.com/harili/project-training/tree/main/BankAccountProject/BankAccount.Core.Tests
21 replies
CC#
Created by Kays on 4/23/2023 in #help
❔ C# - How to set up hexagonal architecture in a c# project using TDD
The term was unknown for me at first but it seems to be a program oriented business logic. I'm still doing it right now
21 replies
CC#
Created by Kays on 4/23/2023 in #help
❔ C# - How to set up hexagonal architecture in a c# project using TDD
Exactly ! So I'm going to do the TDD cycle : Red, Green and Refractor. I'm coming soon with the first test
21 replies
CC#
Created by Kays on 4/23/2023 in #help
❔ C# - How to set up hexagonal architecture in a c# project using TDD
Oh my bad I copied the wrong text. Here the good one : Depositing a positive amount should increase the account balance. Attempting to deposit a zero or negative amount should raise an exception. Withdrawal of an amount less than the current balance should decrease the account balance. Attempting to withdraw an amount greater than or equal to the current balance should remove an exception.
21 replies
CC#
Created by Kays on 4/23/2023 in #help
❔ C# - How to set up hexagonal architecture in a c# project using TDD
So I wrote some use case : Create an Account object with an initial balance. Call the Withdraw method of the AccountService with a specified amount. Assert that the method returns the correct balance after the withdrawal. Assert that the balance of the Account object has been updated correctly.
21 replies
CC#
Created by Kays on 4/23/2023 in #help
❔ C# - How to set up hexagonal architecture in a c# project using TDD
So far it is what I did. All classes are empty. It allows me to have a first step to write unit test
21 replies
CC#
Created by Kays on 4/23/2023 in #help
❔ C# - How to set up hexagonal architecture in a c# project using TDD
Here the structure of my solution .sln : - API project - Library classes project : - Business - Account.cs - Transaction.cs - Data - Account.cs - Transaction.cs -Services - Repositories - IAccount.cs (interface) - AccountService.cs - Test project (xUnit) - AccountTest.cs
21 replies
CC#
Created by Kays on 4/23/2023 in #help
❔ C# - How to set up hexagonal architecture in a c# project using TDD
Oh okay. Because I created the architecture of the code first before. I was thinking doing the tests after. But okay, I do have to delete everything ?
21 replies