This test appears to be locale sensitive, so fix the locale in the test

This commit is contained in:
Hugo Trippaers 2013-09-24 18:29:44 +08:00
parent e61f1bb158
commit 5ada5e88f3

View File

@ -18,12 +18,15 @@ package com.cloud.utils;
import static org.junit.Assert.*;
import java.util.Locale;
import org.junit.Test;
public class NumbersUtilTest {
@Test
public void formattingCheck() {
Locale.setDefault(Locale.US); // Fixed locale for the test
long size = 1024*1024*1024;
String formatted = NumbersUtil.toReadableSize(size);
assertEquals("1.00 GB", formatted);