This kata is originally from codingdojo.org:
It occurs now and then in real life that people want to write about money, especially about a certain amount of money. If it comes to cheques or contracts for example some nations have laws that state that you should write out the amount in words additionally to the amount in numbers to avoid fraud and mistakes. So if you want to transfer 745 $ to someone via cheque you have to fill out two fields:
745.00 $ (amount in numbers)
seven hundred and fourty five dollars (amount in words)
public void ShouldTranslateOne()
{
Assert.Equal("en", 1.ToWords());
}
Download dotnet SDK and Visual Studio Code.
dotnet new sln
dotnet new classlib -o NumbersInWords
dotnet sln add ./NumbersInWords/NumbersInWords.csproj
dotnet new xunit -o NumbersInWords.Tests
dotnet sln add ./NumbersInWords.Tests/NumbersInWords.Tests.csproj
dotnet add ./NumbersInWords.Tests/NumbersInWords.Tests.csproj reference ./NumbersInWords/NumbersInWords.csproj
dotnet watch --project ./NumbersInWords.Test/NumbersInWords.Test.csproj test