package org.javasimon.utils;

import org.testng.annotations.Test;
import org.testng.Assert;

/**
 * OtherTestNG.
 *
 * @author <a href="mailto:virgo47@gmail.com">Richard "Virgo" Richter</a>
 */
public final class UtilsTestNG {
	@Test
	public void testUtilPresentNanoTime() {
		Assert.assertEquals(SimonUtils.presentNanoTime(1), "1 ns");
		Assert.assertEquals(SimonUtils.presentNanoTime(47), "47 ns");
		Assert.assertEquals(SimonUtils.presentNanoTime(999), "999 ns");
		Assert.assertEquals(SimonUtils.presentNanoTime(1047), "1.05 us");
		Assert.assertEquals(SimonUtils.presentNanoTime(11047), "11.0 us");
		Assert.assertEquals(SimonUtils.presentNanoTime(141047), "141 us");
		Assert.assertEquals(SimonUtils.presentNanoTime(942141047), "942 ms");
		Assert.assertEquals(SimonUtils.presentNanoTime(942141047666L), "942 s");
		Assert.assertEquals(SimonUtils.presentNanoTime(10942141047666L), "10942 s");
	}
}

@@ -23,16 +23,60 @@
 utils;%0A%0A
+import org.testng.annotations.DataProvider;%0A
 import o
@@ -103,16 +103,16 @@
 s.Test;%0A
-
 import o
@@ -270,113 +270,130 @@
 %7B%0A%09@
-Test%0A%09public void
+DataProvider(name = %22test-data-utils%22)%0A%09public Object%5B%5D%5B%5D
  test
+Data
 Util
+s
 Pr
-esentNanoTime() %7B%0A%09%09Assert.assertEquals(SimonUtils.presentNanoTime(1)
+ovider() %7B%0A%09%09return new Object%5B%5D%5B%5D%7B%0A%09%09%09%7B1
 , %221 ns%22
 );%0A%09
@@ -392,63 +392,17 @@
  ns%22
-);%0A%09%09Assert.assertEquals(SimonUtils.presentNanoTime(
+%7D,%0A%09%09%09%7B
 47
-)
 , %224
@@ -410,64 +410,18 @@
  ns%22
-);%0A%09%09Assert.assertEquals(SimonUtils.presentNanoTime(
+%7D,%0A%09%09%09%7B
 999
-)
 , %229
@@ -430,65 +430,19 @@
  ns%22
-);%0A%09%09Assert.assertEquals(SimonUtils.presentNanoTime(
+%7D,%0A%09%09%09%7B
 1047
-)
 , %221
@@ -452,66 +452,20 @@
  us%22
-);%0A%09%09Assert.assertEquals(SimonUtils.presentNanoTime(
+%7D,%0A%09%09%09%7B
 11047
-)
 , %221
@@ -475,67 +475,21 @@
  us%22
-);%0A%09%09Assert.assertEquals(SimonUtils.presentNanoTime(
+%7D,%0A%09%09%09%7B
 141047
-)
 , %221
@@ -498,60 +498,72 @@
  us%22
-);%0A%09%09Assert.assertEquals(SimonUtils.presentNanoTime(
+%7D,%0A%09%09%09%7B942141047, %22942 ms%22%7D,%0A%09%09%09%7B942141047666L, %22942 s%22%7D,%0A%09%09%09%7B10
 9421
@@ -571,56 +571,98 @@
 1047
-)
+666L
 , %22
+10
 942 
-m
 s%22
-);%0A%09%09Assert.assertEquals(Simon
+%7D,%0A%09%09%7D;%0A%09%7D%0A%0A%09@Test(dataProvider = %22test-data-utils%22)%0A%09public void test
 Util
-s.p
+P
 rese
@@ -676,33 +676,63 @@
 ime(
-942141047666L), %22942 s%22);
+long ns, String nsString) throws InterruptedException %7B
 %0A%09%09A
@@ -781,35 +781,21 @@
 ime(
-10942141047666L), %2210942 s%22
+ns), nsString
 );%0A%09

test changed to data provider driven :-)