This application allows users to simulate CDB investments and find out the gross and net income after a given period of months.
- .NET Core SDK 7.0
- Node.js v18.17.0
- npm 9.6.7
- Angular CLI 16.1.6
- OS: win32 x64
- Google Chrome Web Browser (because Angular is from Google and it's too annoying to make the tests run in another browsers.)
Clone the repository to your local machine:
git clone https://github.com/nelsonciofi/cdb-calculation.git
- Navigate to /src
- To build and run the project, execute the following commands:
dotnet restore
dotnet build
dotnet run --project ./webapi/webapi.csproj
We use xUnit for unit testing. Follow these steps to run the unit tests.
- Navigate to /src
- Run the tests using the following command:
1. dotnet test
If you are looking for code coverage, run the following command:
dotnet test --collect:"XPlat Code Coverage"
A coverage.cobertura.xml file will be created in B3.Tests project with lots of statitics about code coverage.
- Install the required dependencies using npm:
npm install
- Run the Angular development server:
ng serve
- Open your web browser and navigate to http://localhost:4200 to access the application.
- Fill in the initial investment and redeem term months, then click the "Submit" button to simulate the CDB calculation.
This project uses Jasmine and Karma for testing. To run the tests, follow these steps:
- Ensure you have the required dependencies installed:
npm install
- Run the tests:
ng test
Optionally, you can run the RunitBabe and it will run the frontend and backend.
Then navigate to http://localhost:4200 on your web browser.
This project is licensed under the MIT License.