Pour tout problème contactez-nous par mail : support@froggit.fr | La FAQ :grey_question: | Rejoignez-nous sur le Chat :speech_balloon:

Skip to content
Snippets Groups Projects
Commit 376b1661 authored by Edouard Mangel's avatar Edouard Mangel
Browse files

Supprimé CreditComputerTests, qui est testé au travers du usecase

parent 66d7766c
No related branches found
No related tags found
1 merge request!1Master
namespace Domain;
public class CreditComputer
internal class CreditComputer
{
public static decimal ComputeMonthlyPayment(int duration, decimal amount, decimal rate)
internal static decimal ComputeMonthlyPayment(int duration, decimal amount, decimal rate)
{
decimal monthlyRate = rate / 100 / 12;
decimal numerator = amount * monthlyRate;
......
namespace LiveCodingTP3.Tests;
using Domain;
using LiveCodingTP3.Console;
public class CreditComputerTest
{
[Theory]
[InlineData(120, 100000, 2d, 920.13)]
[InlineData(120, 100000, 4d, 1012.45)]
[InlineData(240, 200000, 3d, 1109.19)]
public void MonthlyamountShouldBeOk(int duration, decimal amount, decimal rate, decimal expectedMonthlyPayment)
{
decimal monthlyAmount = CreditComputer.ComputeMonthlyPayment(duration, amount, rate);
Assert.Equal(expectedMonthlyPayment, monthlyAmount);
}
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment