Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
40 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
sample/src/androidTest/java/br/com/concrete/canarinho/sample/BugOnApi28Test.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package br.com.concrete.canarinho.sample; | ||
|
||
import android.support.test.filters.SdkSuppress; | ||
import android.support.test.runner.AndroidJUnit4; | ||
|
||
import org.junit.Test; | ||
import org.junit.runner.RunWith; | ||
|
||
import br.com.concrete.canarinho.formatador.Formatador; | ||
|
||
import static org.junit.Assert.assertEquals; | ||
|
||
@RunWith(AndroidJUnit4.class) | ||
public class BugOnApi28Test { | ||
|
||
@Test | ||
@SdkSuppress(minSdkVersion = 28) | ||
public void moneyFormatSuccessfulRunsOnApi28() { | ||
final String value = "1.000.000,00"; | ||
assertEquals("1000000.00", Formatador.VALOR.desformata(value)); | ||
} | ||
|
||
@Test | ||
@SdkSuppress(maxSdkVersion = 27) | ||
public void moneyFormatSuccessfulRunsOnApi27() { | ||
final String value = "1.000.000,00"; | ||
assertEquals("1000000.00", Formatador.VALOR.desformata(value)); | ||
} | ||
} |