Search in sources :

Example 36 with Log

use of com.codename1.io.Log in project CodenameOne by codenameone.

the class TestUtils method assertTextAreaContaining.

/**
 * Asserts that we have a TextArea with the a text contains the given text and with the given name
 * @param name the name of the TextArea
 * @param text the sequence to search for in the TextArea
 */
public static void assertTextAreaContaining(String name, String text) {
    if (verbose) {
        log("assertTextAreaContaining(" + name + ", " + text + ")");
    }
    TextArea l = (TextArea) findByName(name);
    assertBool(l != null, "Null area " + text);
    assertBool(l.getText().indexOf(text) > -1, "assertTextArea: \"" + l.getText() + "\" is not containing: \"" + text + "\"");
}
Also used : TextArea(com.codename1.ui.TextArea)

Aggregations

Component (com.codename1.ui.Component)9 IOException (java.io.IOException)9 TextArea (com.codename1.ui.TextArea)8 Label (com.codename1.ui.Label)4 InputStream (java.io.InputStream)4 Button (com.codename1.ui.Button)3 Form (com.codename1.ui.Form)3 BorderLayout (com.codename1.ui.layouts.BorderLayout)3 ByteArrayInputStream (java.io.ByteArrayInputStream)3 ParseException (java.text.ParseException)3 Date (java.util.Date)3 TimerTask (java.util.TimerTask)3 Cursor (android.database.Cursor)2 Address (com.codename1.contacts.Address)2 Contact (com.codename1.contacts.Contact)2 BufferedInputStream (com.codename1.io.BufferedInputStream)2 Location (com.codename1.location.Location)2 Command (com.codename1.ui.Command)2 ActionEvent (com.codename1.ui.events.ActionEvent)2 SimpleDateFormat (java.text.SimpleDateFormat)2