An open API service indexing awesome lists of open source software.

https://github.com/jferrl/roman-numerals-kata

Roman Numerals Kata
https://github.com/jferrl/roman-numerals-kata

golang outside-in-tdd pair-programming starter tdd-kata

Last synced: 11 months ago
JSON representation

Roman Numerals Kata

Awesome Lists containing this project

README

          

# Golang Roman Numerals Kata

[![Go Report Card](https://goreportcard.com/badge/github.com/jferrl/roman-numerals-kata)](https://goreportcard.com/report/github.com/jferrl/roman-numerals-kata)
[![Build Status](https://travis-ci.org/jferrl/roman-numerals-kata.svg?branch=master)](https://travis-ci.org/jferrl/roman-numerals-kata)

[Roman Numerals Kata](https://kata-log.rocks/roman-numerals-kata)

## Your Task

Write a method String convert(int) that takes a number and converts it to the according String representation.

## Examples

1 ➔ I

2 ➔ II

3 ➔ III

4 ➔ IV

5 ➔ V

9 ➔ IX

21 ➔ XXI

50 ➔ L

100 ➔ C

500 ➔ D

1000 ➔ M

## Hint

This kata lures a lot of people to implement features in the order of the numbers. But do not forget that it’s sometimes easier to start with a general case and add exceptions later.

## Test

You can test this proyect using `go test`. Just run:

```bash
go test ./...
```