@@ -0,0 +1,2514 @@
+import static org.junit.Assert.assertEquals;%0A%0Aimport org.junit.Before;%0Aimport org.junit.Rule;%0Aimport org.junit.Test;%0Aimport org.junit.rules.ExpectedException;%0A%0Apublic class StringCalculatorTest %7B%0A%0A    @Rule%0A    public ExpectedException exception = ExpectedException.none();%0A%0A    private StringCalculator stringCalculator;%0A%0A    @Before%0A    public void setUp() %7B%0A        stringCalculator = new StringCalculator();%0A    %7D%0A%0A    @Test%0A    public void deveRetornarASomaDeNenhumNumero() %7B%0A        int soma = stringCalculator.add(%22%22);%0A        assertEquals(0, soma);%0A    %7D%0A%0A    @Test%0A    public void deveRetornarASomaDeUmNumero() %7B%0A        int soma = stringCalculator.add(%221%22);%0A        assertEquals(1, soma);%0A%0A        soma = stringCalculator.add(%22999%22);%0A        assertEquals(999, soma);%0A    %7D%0A%0A    @Test%0A    public void deveRetornarASomaDeDoisNumeros() %7B%0A        int soma = stringCalculator.add(%221,2%22);%0A        assertEquals(3, soma);%0A%0A        soma = stringCalculator.add(%2216,27%22);%0A        assertEquals(43, soma);%0A    %7D%0A%0A    @Test%0A    public void deveSomarNumeroIlimitadoDeNumeros() %7B%0A        int soma = stringCalculator.add(%221,2,0,10%22);%0A        assertEquals(13, soma);%0A    %7D%0A%0A    @Test%0A    public void devePermitirNovaLinhaComoDelimitador() %7B%0A        int soma = stringCalculator.add(%221%5Cn2,3%22);%0A        assertEquals(6, soma);%0A%0A        soma = stringCalculator.add(%221,%5Cn%22);%0A        assertEquals(1, soma);%0A    %7D%0A%0A    @Test%0A    public void devePermitirDelimitadorComoParametro() %7B%0A        int soma = stringCalculator.add(%22//;%5Cn1;2%22);%0A        assertEquals(3, soma);%0A    %7D%0A%0A    @Test%0A    public void numerosNegativosNaoSaoPermitidos() %7B%0A        exception.expect(IllegalArgumentException.class);%0A        exception.expectMessage(%22Negatives not allowed: -3%22);%0A        stringCalculator.add(%22//;%5Cn1;2;-3%22);%0A    %7D%0A%0A    @Test%0A    public void mostraNegativosNaMensagem() %7B%0A        exception.expect(IllegalArgumentException.class);%0A        exception.expectMessage(%22Negatives not allowed: -3 -9 -1%22);%0A        stringCalculator.add(%22//;%5Cn1;2;-3;-9;-1%22);%0A    %7D%0A%0A    @Test%0A    public void ignoraNumerosMaiorQue1000() %7B%0A        int soma = stringCalculator.add(%222,1001%22);%0A        assertEquals(2, soma);%0A    %7D%0A%0A    @Test%0A    public void delimitadoresPodemTerQualquerTamanho() %7B%0A        int soma = stringCalculator.add(%22//%5B***%5D%5Cn1***2***3%22);%0A        assertEquals(6, soma);%0A    %7D%0A%0A    @Test%0A    public void podemHaverMaisDelimitadores() %7B%0A        int soma = stringCalculator.add(%22//%5B***%5D%5B;%5D%5Cn1***2***3;4;5%22);%0A        assertEquals(15, soma);%0A    %7D%0A%0A%7D%0A

Create StringCalculatorTest.java