org.fest.assertions.Assertions



API Populatity

7 Client projects

Project: org.fest

Project mockito/mockito in file ...ockito.internal.creation.MockSettingsImplTest.java (2009-11-21)
@@ -4,15 +4,13 @@
  */
 package org.mockito.internal.creation;
 
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Set;
-import java.io.Serializable;
-
 import org.junit.Test;
 import org.mockito.exceptions.base.MockitoException;
 import org.mockitoutil.TestBase;
-import org.fest.assertions.Assertions;
+
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Set;
 
 public class MockSettingsImplTest extends TestBase {
 
@@ -59,7 +57,7 @@ public class MockSettingsImplTest extends TestBase {
         mockSettingsImpl.serializable();
 
         //then
-        Assertions.assertThat(mockSettingsImpl.getExtraInterfaces()).contains(Serializable.class);
+        assertTrue(mockSettingsImpl.isSerializable());
     }
 
     @Test
Project excilys/androidannotations in file ...dannotations.test15.ViewsInjectedActivityTest.java (2011-10-02)
@@ -18,6 +18,7 @@ package com.googlecode.androidannotations.test15;
 //import static org.fest.assertions.Assertions.assertThat;
 import static com.googlecode.androidannotations.test15.MyAssertions.assertThat;
 
+import org.fest.assertions.Assertions;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -54,5 +55,12 @@ public class ViewsInjectedActivityTest {
 	public void unannotatedViewIsNull() {
 		assertThat(activity.unboundView).isNull();
 	}
+	
+	@Test
+	public void countAfterSetContentViewCalls() {
+		Assertions.assertThat(activity.counter).isEqualTo(1);
+		activity.setContentView(R.layout.views_injected);
+		Assertions.assertThat(activity.counter).isEqualTo(2);
+	}
 
 }
Project SonarSource/sonarqube in file ...a.org.sonar.server.issue.IssuesFinderSortTest.java (2013-05-22)
@@ -21,6 +21,7 @@
 package org.sonar.server.issue;
 
 import org.apache.commons.lang.time.DateUtils;
+import org.fest.assertions.Assertions;
 import org.junit.Test;
 import org.sonar.api.issue.IssueQuery;
 import org.sonar.core.issue.db.IssueDto;
@@ -65,10 +66,10 @@ public class IssuesFinderSortTest {
 
     List<IssueDto> result = newArrayList(issuesFinderSort.sort());
 
-    assertThat(result).hasSize(3);
-    assertThat(result.get(0).getStatus()).isEqualTo("REOPENED");
-    assertThat(result.get(1).getStatus()).isEqualTo("OPEN");
-    assertThat(result.get(2).getStatus()).isEqualTo("CLOSED");
+    Assertions.assertThat(result).hasSize(3);
+    Assertions.assertThat(result.get(0).getStatus()).isEqualTo("REOPENED");
+    Assertions.assertThat(result.get(1).getStatus()).isEqualTo("OPEN");
+    Assertions.assertThat(result.get(2).getStatus()).isEqualTo("CLOSED");
   }
 
   @Test
@@ -83,10 +84,10 @@ public class IssuesFinderSortTest {
 
     List<IssueDto> result = newArrayList(issuesFinderSort.sort());
 
-    assertThat(result).hasSize(3);
-    assertThat(result.get(0).getSeverity()).isEqualTo("INFO");
-    assertThat(result.get(1).getSeverity()).isEqualTo("MAJOR");
-    assertThat(result.get(2).getSeverity()).isEqualTo("BLOCKER");
+    Assertions.assertThat(result).hasSize(3);
+    Assertions.assertThat(result.get(0).getSeverity()).isEqualTo("INFO");
+    Assertions.assertThat(result.get(1).getSeverity()).isEqualTo("MAJOR");
+    Assertions.assertThat(result.get(2).getSeverity()).isEqualTo("BLOCKER");
   }
 
   @Test
@@ -105,10 +106,10 @@ public class IssuesFinderSortTest {
 
     List<IssueDto> result = newArrayList(issuesFinderSort.sort());
 
-    assertThat(result).hasSize(3);
-    assertThat(result.get(0).getIssueCreationDate()).isEqualTo(date3);
-    assertThat(result.get(1).getIssueCreationDate()).isEqualTo(date2);
-    assertThat(result.get(2).getIssueCreationDate()).isEqualTo(date1);
+    Assertions.assertThat(result).hasSize(3);
+    Assertions.assertThat(result.get(0).getIssueCreationDate()).isEqualTo(date3);
+    Assertions.assertThat(result.get(1).getIssueCreationDate()).isEqualTo(date2);
+    Assertions.assertThat(result.get(2).getIssueCreationDate()).isEqualTo(date1);
   }
 
   @Test
@@ -127,10 +128,10 @@ public class IssuesFinderSortTest {
 
     List<IssueDto> result = newArrayList(issuesFinderSort.sort());
 
-    assertThat(result).hasSize(3);
-    assertThat(result.get(0).getIssueUpdateDate()).isEqualTo(date3);
-    assertThat(result.get(1).getIssueUpdateDate()).isEqualTo(date2);
-    assertThat(result.get(2).getIssueUpdateDate()).isEqualTo(date1);
+    Assertions.assertThat(result).hasSize(3);
+    Assertions.assertThat(result.get(0).getIssueUpdateDate()).isEqualTo(date3);
+    Assertions.assertThat(result.get(1).getIssueUpdateDate()).isEqualTo(date2);
+    Assertions.assertThat(result.get(2).getIssueUpdateDate()).isEqualTo(date1);
   }
 
   @Test
@@ -149,10 +150,10 @@ public class IssuesFinderSortTest {
 
     List<IssueDto> result = newArrayList(issuesFinderSort.sort());
 
-    assertThat(result).hasSize(3);
-    assertThat(result.get(0).getIssueCloseDate()).isEqualTo(date3);
-    assertThat(result.get(1).getIssueCloseDate()).isEqualTo(date2);
-    assertThat(result.get(2).getIssueCloseDate()).isEqualTo(date1);
+    Assertions.assertThat(result).hasSize(3);
+    Assertions.assertThat(result.get(0).getIssueCloseDate()).isEqualTo(date3);
+    Assertions.assertThat(result.get(1).getIssueCloseDate()).isEqualTo(date2);
+    Assertions.assertThat(result.get(2).getIssueCloseDate()).isEqualTo(date1);
   }
 
 }