/** * Synonym of methods {@link JSpec#the(Object)} or {@link JSpec#a(Object)}. * * @param o1 instance for checking * @return generalized expectation */ public static Expectation<Object> $(Object o1){ return a(o1); }
public static Expectation<Object> the(Object o1){ return a(o1); }
default Expectation<Object> a(Object o1){ return JSpec.a(o1); }
a(lineSeparator).shouldNotBeNull(); int[] base64 = Decoder.fromBase64; for (byte b : lineSeparator) {
/** * Expect that the results are different, throw TestException if same. * * @param expectation difference expectation. */ public static <T> void expect(DifferenceExpectation<T> expectation) { a(expectation.getExpected()).shouldNotBeEqual(expectation.exec()); } }
/** * Synonym of methods {@link JSpec#the(Object)} or {@link JSpec#a(Object)}. * * @param o1 instance for checking * @return generalized expectation */ public static Expectation<Object> $(Object o1){ return a(o1); }
public static Expectation<Object> the(Object o1){ return a(o1); }
public static Expectation<Object> the(Object o1){ return a(o1); }
default Expectation<Object> a(Object o1){ return JSpec.a(o1); }
public Expectation<Object> a(Object o1){ return JSpec.a(o1); }
/** * Convenience method to add a non-file form item to request. * Will call {@link #formItem(String, String, boolean, String, byte[])} internally. * Content type will be set to "text/plain", and "isFile" to false. * * @param fieldName name of field - toString() will be used to add to form item * @param value - value of parameter, toString().getBytes() will be used to add to form item * @return @return {@link org.javalite.activeweb.RequestBuilder} for setting additional request parameters. * * @see {@link #formItem(String, String, boolean, String, byte[])} * */ public RequestBuilder formItem(Object fieldName, Object value){ a(fieldName).shouldNotBeNull(); a(value).shouldNotBeNull(); return formItem(fieldName.toString(), fieldName.toString(), false, "text/plain", value.toString().getBytes()); }
/** * Convenience method for sending pairs of name and values with multi-part request. * * @param namesAndValues names and following corresponding values. The following pattern is expected: * name,value,name1,value1... * @return @return {@link org.javalite.activeweb.RequestBuilder} for setting additional request parameters. */ public RequestBuilder formItems(Object ... namesAndValues){ if(namesAndValues.length % 2 != 0) throw new IllegalArgumentException("number of arguments must be even"); for (int i = 0; i < namesAndValues.length - 1; i += 2) { a(namesAndValues[i]).shouldNotBeNull(); a(namesAndValues[i + 1]).shouldNotBeNull(); formItem(namesAndValues[i].toString(), namesAndValues[i].toString(), false, "text/plain", namesAndValues[i + 1].toString().getBytes()); } return this; }
a(lineSeparator).shouldNotBeNull(); int[] base64 = Decoder.fromBase64; for (byte b : lineSeparator) {
a(lineSeparator).shouldNotBeNull(); int[] base64 = Decoder.fromBase64; for (byte b : lineSeparator) {
/** * Expect that the results are different, throw TestException if same. * * @param expectation difference expectation. */ public static <T> void expect(DifferenceExpectation<T> expectation) { a(expectation.getExpected()).shouldNotBeEqual(expectation.exec()); } }
/** * Expect that the results are different, throw TestException if same. * * @param expectation difference expectation. */ public static <T> void expect(DifferenceExpectation<T> expectation) { a(expectation.getExpected()).shouldNotBeEqual(expectation.exec()); } }