org.fest.assertions.Assertions.assertThat-s



Project dynjs/dynjs in file ...test.java.org.dynjs.runtime.InvokeDynamicTest.java (2013-06-17)
@@ -1,11 +1,11 @@
 package org.dynjs.runtime;
 
-import static org.fest.assertions.Assertions.*;
-
 import org.dynjs.runtime.java.JavaMockery;
 import org.junit.Test;
 import org.projectodd.rephract.mop.java.DynamicMethod;
 
+import static org.fest.assertions.Assertions.assertThat;
+
 public class InvokeDynamicTest extends AbstractDynJSTestSupport {
 
     @Test
Project SonarSource/sonarqube in file ....test.java.org.sonar.process.ProcessUtilsTest.java (2014-09-30)
@@ -22,10 +22,12 @@ package org.sonar.process;
 import org.junit.Test;
 import org.sonar.test.TestUtils;
 
+import static org.fest.assertions.Assertions.assertThat;
+
 public class ProcessUtilsTest {
 
   @Test
   public void private_constructor() throws Exception {
-    TestUtils.assertPrivateConstructor(ProcessUtils.class);
+    assertThat(TestUtils.hasOnlyPrivateConstructors(ProcessUtils.class)).isTrue();
   }
 }
Project SonarSource/sonarqube in file ...lugins.core.issue.InitialOpenIssuesSensorTest.java (2013-05-31)
@@ -27,6 +27,7 @@ import org.sonar.core.issue.db.IssueDto;
 
 import java.util.Date;
 
+import static org.fest.assertions.Assertions.assertThat;
 import static org.mockito.Matchers.any;
 import static org.mockito.Matchers.anyListOf;
 import static org.mockito.Mockito.mock;
@@ -49,4 +50,10 @@ public class InitialOpenIssuesSensorTest {
     verify(issueDao).selectNonClosedIssuesByModule(1);
     verify(stack).setIssues(anyListOf(IssueDto.class), any(Date.class));
   }
+
+  @Test
+  public void test_toString() throws Exception {
+    assertThat(sensor.toString()).isEqualTo("InitialOpenIssuesSensor");
+
+  }
 }
Project dynjs/dynjs in file ...va.org.dynjs.runtime.java.JavaIntegrationTest.java (2014-09-05)
@@ -1,13 +1,5 @@
 package org.dynjs.runtime.java;
 
-import static org.fest.assertions.Assertions.*;
-import static org.junit.Assert.*;
-
-import java.io.File;
-import java.net.InetSocketAddress;
-import java.util.Map;
-import java.util.concurrent.Executor;
-
 import org.dynjs.exception.ThrowException;
 import org.dynjs.runtime.AbstractDynJSTestSupport;
 import org.dynjs.runtime.Types;
@@ -15,6 +7,14 @@ import org.jboss.netty.channel.SimpleChannelHandler;
 import org.junit.Ignore;
 import org.junit.Test;
 
+import java.io.File;
+import java.net.InetSocketAddress;
+import java.util.Map;
+import java.util.concurrent.Executor;
+
+import static org.fest.assertions.Assertions.assertThat;
+import static org.junit.Assert.fail;
+
 public class JavaIntegrationTest extends AbstractDynJSTestSupport {
 
     @Test
@@ -805,4 +805,5 @@ public class JavaIntegrationTest extends AbstractDynJSTestSupport {
         assertThat(eval("thing instanceof org.dynjs.runtime.java.Foo")).isEqualTo(true);
         assertThat(eval("thing instanceof org.dynjs.runtime.java.Foobar")).isEqualTo(false);
     }
+
 }
Project SonarSource/sonarqube in file ...onar.batch.index.DefaultResourcePersisterTest.java (2012-09-27)
@@ -21,6 +21,7 @@ package org.sonar.batch.index;
 
 import org.junit.Before;
 import org.junit.Test;
+import org.sonar.api.database.model.ResourceModel;
 import org.sonar.api.resources.JavaFile;
 import org.sonar.api.resources.JavaPackage;
 import org.sonar.api.resources.Library;
@@ -30,6 +31,7 @@ import org.sonar.jpa.test.AbstractDbUnitTestCase;
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
 
+import static org.fest.assertions.Assertions.assertThat;
 import static org.hamcrest.CoreMatchers.is;
 import static org.hamcrest.MatcherAssert.assertThat;
 import static org.hamcrest.Matchers.notNullValue;
@@ -68,6 +70,10 @@ public class DefaultResourcePersisterTest extends AbstractDbUnitTestCase {
     persister.saveProject(singleProject, null);
 
     checkTables("shouldSaveNewProject", new String[] {"build_date", "created_at"}, "projects", "snapshots");
+
+    // SONAR-3636 : created_at must be fed when inserting a new entry in the 'projects' table
+    ResourceModel model = getSession().getSingleResult(ResourceModel.class, "key", singleProject.getKey());
+    assertThat(model.getCreatedAt()).isNotNull();
   }
 
   @Test