congrats Icon
New! Announcing our next generation AI code completions
Read here
Tabnine Logo
junitx.framework
Code IndexAdd Tabnine to your IDE (free)

How to use junitx.framework

Best Java code snippets using junitx.framework (Showing top 20 results out of 315)

origin: org.apache.shindig/shindig-gadgets

private JSONObject extractJsonFromResponse(String response) throws JSONException {
 String defaultCruftMsg = "throw 1; < don't be evil' >";
 assertStartsWith(defaultCruftMsg, response);
 response = response.substring(defaultCruftMsg.length());
 return new JSONObject(response).getJSONObject(REQUEST_URL.toString());
}
origin: alien4cloud/alien4cloud

@Then("^The downloaded file should have the same content as the local file \"([^\"]*)\"$")
public void The_downloaded_file_should_have_the_same_content_as_the_local_file(String localFilePath) throws Throwable {
  FileAssert.assertEquals(new File(Context.LOCAL_TEST_DATA_PATH.resolve(localFilePath).toString()), new File(CURRENT_DOWNLOADED_FILE_PATH));
}
origin: org.apache.shindig/shindig-common

 @Test
 public void testLatin1() {
  ArrayAssert.assertEquals(LATIN1_UTF8_DATA, CharsetUtil.getUtf8Bytes(LATIN1_STRING));
 }
}
origin: com.lmco.shindig/shindig-gadgets

 public void testHashCode() {
  BasicOAuthStoreTokenIndex eq1 = new BasicOAuthStoreTokenIndex();
  BasicOAuthStoreTokenIndex eq2 = new BasicOAuthStoreTokenIndex();

  // just be sure that our new hashcode method works
  eq1.setModuleId(100);
  eq2.setModuleId(200);
  assertNotEquals(eq1.hashCode(), eq2.hashCode());

 }
}
origin: org.apache.shindig/shindig-gadgets

@Test
public void testDoGetNormalWithLockedDomainUnsafe() throws Exception {
 setupRequest(BASIC_SYNTAX_URL, false);
 replay();
 servlet.doGet(request, recorder);
 verify();
 assertEquals(HttpServletResponse.SC_BAD_REQUEST, recorder.getHttpStatusCode());
 assertContains("wrong domain", recorder.getResponseAsString());
}
origin: org.wso2.org.apache.shindig/shindig-common

 @Test
 public void testLatin1() {
  ArrayAssert.assertEquals(LATIN1_UTF8_DATA, CharsetUtil.getUtf8Bytes(LATIN1_STRING));
 }
}
origin: org.apache.shindig/shindig-gadgets

 public void testHashCode() {
  BasicOAuthStoreTokenIndex eq1 = new BasicOAuthStoreTokenIndex();
  BasicOAuthStoreTokenIndex eq2 = new BasicOAuthStoreTokenIndex();

  // just be sure that our new hashcode method works
  eq1.setModuleId(100);
  eq2.setModuleId(200);
  assertNotEquals(eq1.hashCode(), eq2.hashCode());

 }
}
origin: org.wso2.org.apache.shindig/shindig-gadgets

private JSONObject extractJsonFromResponse(String response) throws JSONException {
 String defaultCruftMsg = "throw 1; < don't be evil' >";
 assertStartsWith(defaultCruftMsg, response);
 response = response.substring(defaultCruftMsg.length());
 return new JSONObject(response).getJSONObject(REQUEST_URL.toString());
}
origin: apache/shindig

 @Test
 public void testLatin1() {
  ArrayAssert.assertEquals(LATIN1_UTF8_DATA, CharsetUtil.getUtf8Bytes(LATIN1_STRING));
 }
}
origin: org.wso2.org.apache.shindig/shindig-gadgets

 public void testHashCode() {
  BasicOAuthStoreTokenIndex eq1 = new BasicOAuthStoreTokenIndex();
  BasicOAuthStoreTokenIndex eq2 = new BasicOAuthStoreTokenIndex();

  // just be sure that our new hashcode method works
  eq1.setModuleId(100);
  eq2.setModuleId(200);
  assertNotEquals(eq1.hashCode(), eq2.hashCode());

 }
}
origin: org.gatein.shindig/shindig-common

 @Test
 public void testLatin1() {
  ArrayAssert.assertEquals(LATIN1_UTF8_DATA, CharsetUtil.getUtf8Bytes(LATIN1_STRING));
 }
}
origin: org.apache.shindig/shindig-common

@Test
public void equalsAndHashCodeOk() {
 UriBuilder uri = UriBuilder.parse("http://example.org/foo/bar/baz?blah=blah#boo");
 UriBuilder uri2 = new UriBuilder(Uri.parse("http://example.org/foo/bar/baz?blah=blah#boo"));
 assertEquals(uri, uri2);
 assertEquals(uri2, uri);
 assertEquals(uri, uri);
 assertNotNull(uri);
 assertNotEquals(uri, "http://example.org/foo/bar/baz?blah=blah#boo");
 assertNotEquals(uri, Uri.parse("http://example.org/foo/bar/baz?blah=blah#boo"));
 assertEquals(uri.hashCode(), uri2.hashCode());
}
origin: com.lmco.shindig/shindig-common

 @Test
 public void testLatin1() {
  ArrayAssert.assertEquals(LATIN1_UTF8_DATA, CharsetUtil.getUtf8Bytes(LATIN1_STRING));
 }
}
origin: org.gatein.shindig/shindig-common

@Test
public void equalsAndHashCodeOk() {
 UriBuilder uri = UriBuilder.parse("http://example.org/foo/bar/baz?blah=blah#boo");
 UriBuilder uri2 = new UriBuilder(Uri.parse("http://example.org/foo/bar/baz?blah=blah#boo"));
 assertEquals(uri, uri2);
 assertEquals(uri2, uri);
 assertEquals(uri, uri);
 assertNotNull(uri);
 assertNotEquals(uri, "http://example.org/foo/bar/baz?blah=blah#boo");
 assertNotEquals(uri, Uri.parse("http://example.org/foo/bar/baz?blah=blah#boo"));
 assertEquals(uri.hashCode(), uri2.hashCode());
}

origin: uk.org.mygrid.taverna.scufl/scufl-model

public void testConstruction() {
  ScuflModel model = new ScuflModel();
  assertFalse(model.offline);
  ArrayAssert.assertEquals(new Processor[0], model.getProcessors());
  ArrayAssert.assertEquals(new DataConstraint[0], model
      .getDataConstraints());
  ArrayAssert.assertEquals(new ConcurrencyConstraint[0], model
      .getConcurrencyConstraints());
  ArrayAssert.assertEquals(new ScuflModelEventListener[0], model
      .getListeners());
  ArrayAssert.assertEquals(new Port[0], model.getWorkflowSinkPorts());
  ArrayAssert.assertEquals(new Port[0], model.getWorkflowSourcePorts());
  assertNotNull(model.getDescription());
  // NOTE: the log level does not seem to be used for anything
  assertEquals(0, model.getLogLevel());
}
origin: org.gatein.shindig/shindig-common

@Test
public void testGetUtf8String() {
 ArrayAssert.assertEquals(new byte[] { 0x69, 0x6e }, CharsetUtil.getUtf8Bytes("in"));
 ArrayAssert.assertEquals(new byte[] {}, CharsetUtil.getUtf8Bytes(null));
 testStringOfLength(0);
 testStringOfLength(10);
 testStringOfLength(100);
 testStringOfLength(1000);
}
 
origin: com.lmco.shindig/shindig-common

@Test
public void testGetUtf8String() {
 ArrayAssert.assertEquals(new byte[] { 0x69, 0x6e }, CharsetUtil.getUtf8Bytes("in"));
 ArrayAssert.assertEquals(new byte[] {}, CharsetUtil.getUtf8Bytes(null));
 testStringOfLength(0);
 testStringOfLength(10);
 testStringOfLength(100);
 testStringOfLength(1000);
}
 
origin: org.apache.shindig/shindig-common

@Test
public void testGetUtf8String() {
 ArrayAssert.assertEquals(new byte[] { 0x69, 0x6e }, CharsetUtil.getUtf8Bytes("in"));
 ArrayAssert.assertEquals(ArrayUtils.EMPTY_BYTE_ARRAY, CharsetUtil.getUtf8Bytes(null));
 testStringOfLength(0);
 testStringOfLength(10);
 testStringOfLength(100);
 testStringOfLength(1000);
}
origin: org.wso2.org.apache.shindig/shindig-common

@Test
public void testGetUtf8String() {
 ArrayAssert.assertEquals(new byte[] { 0x69, 0x6e }, CharsetUtil.getUtf8Bytes("in"));
 ArrayAssert.assertEquals(ArrayUtils.EMPTY_BYTE_ARRAY, CharsetUtil.getUtf8Bytes(null));
 testStringOfLength(0);
 testStringOfLength(10);
 testStringOfLength(100);
 testStringOfLength(1000);
}
origin: apache/shindig

@Test
public void testGetUtf8String() {
 ArrayAssert.assertEquals(new byte[] { 0x69, 0x6e }, CharsetUtil.getUtf8Bytes("in"));
 ArrayAssert.assertEquals(ArrayUtils.EMPTY_BYTE_ARRAY, CharsetUtil.getUtf8Bytes(null));
 testStringOfLength(0);
 testStringOfLength(10);
 testStringOfLength(100);
 testStringOfLength(1000);
}
junitx.framework

Most used classes

  • Assert
  • ArrayAssert
  • ComparableAssert
  • StringAssert
  • FileAssert
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now