net.sourceforge.jwebunit.tests
Class WebAssertionsTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by net.sourceforge.jwebunit.junit.WebTestCase
              extended by net.sourceforge.jwebunit.tests.JWebUnitAPITestCase
                  extended by net.sourceforge.jwebunit.tests.WebAssertionsTest
All Implemented Interfaces:
junit.framework.Test

public class WebAssertionsTest
extends JWebUnitAPITestCase

Test the assertions provided by WebTestCase using the PseudoServer test package provided by Russell Gold in httpunit.

Author:
Wilkes Joiner, Jim Weaver

Field Summary
 
Fields inherited from class net.sourceforge.jwebunit.tests.JWebUnitAPITestCase
HOST_PATH, JETTY_PORT, JETTY_URL, NOARGS
 
Fields inherited from class net.sourceforge.jwebunit.junit.WebTestCase
customTester, tester
 
Constructor Summary
WebAssertionsTest()
           
 
Method Summary
 void setUp()
           
static junit.framework.Test suite()
           
 void testAssertElementContainsText()
           
 void testAssertElementContainsTextInChild()
           
 void testAssertElementNotPresent()
           
 void testAssertElementPresent()
           
 void testAssertFormElementEquals()
          Deprecated.  
 void testAssertFormElementMatch()
           
 void testAssertHiddenFieldPresent()
           
 void testAssertLinkNotPresent()
           
 void testAssertLinkNotPresentWithImage()
           
 void testAssertLinkNotPresentWithText()
           
 void testAssertLinkNotPresentWithTextN()
           
 void testAssertLinkPresent()
           
 void testAssertLinkPresentWithImage()
           
 void testAssertLinkPresentWithText()
           
 void testAssertLinkPresentWithTextN()
           
 void testAssertMatch()
           
 void testAssertMatchInElement()
           
 void testAssertMatchInElementChild()
           
 void testAssertNoMatch()
           
 void testAssertNoMatchFails()
          Check that WebTestCase.assertNoMatch(String) can actually fail.
 void testAssertNoMatchInElement()
           
 void testAssertSelectedOptionEquals()
           
 void testAssertSelectedOptionMatch()
           
 void testAssertTextFieldEquals()
           
 void testAssertTextNotInElement()
           
 void testAssertTextNotPresent()
           
 void testAssertTextPresent()
           
 void testAssertTitleEquals()
           
 void testAssertTitleMatch()
           
 
Methods inherited from class net.sourceforge.jwebunit.tests.JWebUnitAPITestCase
assertException, assertFail, assertFail, assertPass, assertPass, assertPassFail, assertPassFail
 
Methods inherited from class net.sourceforge.jwebunit.junit.WebTestCase
assertButtonNotPresent, assertButtonNotPresentWithText, assertButtonPresent, assertButtonPresentWithText, assertCheckboxNotPresent, assertCheckboxNotPresent, assertCheckboxNotSelected, assertCheckboxNotSelected, assertCheckboxPresent, assertCheckboxPresent, assertCheckboxSelected, assertCheckboxSelected, assertCommentNotPresent, assertCommentPresent, assertCookiePresent, assertCookieValueEquals, assertCookieValueMatch, assertDownloadedFileEquals, assertElementNotPresent, assertElementNotPresentByXPath, assertElementPresent, assertElementPresentByXPath, assertFormElementEmpty, assertFormElementEquals, assertFormElementMatch, assertFormElementNotPresent, assertFormElementPresent, assertFormNotPresent, assertFormNotPresent, assertFormPresent, assertFormPresent, assertFramePresent, assertHeaderEquals, assertHeaderMatches, assertHeaderNotPresent, assertHeaderPresent, assertHiddenFieldPresent, assertImagePresent, assertImagePresentPartial, assertImageValid, assertImageValidAndStore, assertKeyInTable, assertKeyInTable, assertKeyNotInTable, assertKeyNotPresent, assertKeyNotPresent, assertKeyPresent, assertKeyPresent, assertKeysInTable, assertKeysInTable, assertLabeledFieldEquals, assertLabelMatches, assertLabelPresent, assertLinkNotPresent, assertLinkNotPresentWithExactText, assertLinkNotPresentWithExactText, assertLinkNotPresentWithImage, assertLinkNotPresentWithText, assertLinkNotPresentWithText, assertLinkPresent, assertLinkPresentWithExactText, assertLinkPresentWithExactText, assertLinkPresentWithImage, assertLinkPresentWithText, assertLinkPresentWithText, assertMatch, assertMatch, assertMatch, assertMatchInElement, assertMatchInTable, assertMatchInTable, assertNoMatch, assertNoMatchInElement, assertNoMatchInTable, assertNoMatchInTable, assertNotMatch, assertNotMatch, assertRadioOptionNotPresent, assertRadioOptionNotSelected, assertRadioOptionPresent, assertRadioOptionSelected, assertResetButtonNotPresent, assertResetButtonNotPresent, assertResetButtonPresent, assertResetButtonPresent, assertResponseCode, assertResponseCodeBetween, assertSelectedOptionEquals, assertSelectedOptionEquals, assertSelectedOptionMatches, assertSelectedOptionMatches, assertSelectedOptionsEqual, assertSelectedOptionsEqual, assertSelectedOptionsMatch, assertSelectedOptionsMatch, assertSelectedOptionValueEquals, assertSelectedOptionValueEquals, assertSelectedOptionValuesEqual, assertSelectedOptionValuesEqual, assertSelectOptionNotPresent, assertSelectOptionNotPresent, assertSelectOptionPresent, assertSelectOptionPresent, assertSelectOptionsEqual, assertSelectOptionsEqual, assertSelectOptionsNotEqual, assertSelectOptionsNotEqual, assertSelectOptionsPresent, assertSelectOptionsPresent, assertSelectOptionValueNotPresent, assertSelectOptionValueNotPresent, assertSelectOptionValuePresent, assertSelectOptionValuePresent, assertSelectOptionValuesEqual, assertSelectOptionValuesEqual, assertSelectOptionValuesNotEqual, assertSelectOptionValuesNotEqual, assertSelectOptionValuesPresent, assertSelectOptionValuesPresent, assertSubmitButtonNotPresent, assertSubmitButtonNotPresent, assertSubmitButtonPresent, assertSubmitButtonPresent, assertSubmitButtonPresent, assertTableEquals, assertTableEquals, assertTableMatch, assertTableMatch, assertTableNotPresent, assertTablePresent, assertTableRowCountEquals, assertTableRowsEqual, assertTableRowsEqual, assertTableRowsMatch, assertTableRowsMatch, assertTextFieldEquals, assertTextInElement, assertTextInTable, assertTextInTable, assertTextNotInElement, assertTextNotInTable, assertTextNotInTable, assertTextNotPresent, assertTextPresent, assertTitleEquals, assertTitleEqualsKey, assertTitleEqualsKey, assertTitleMatch, assertTitleNotSame, assertWindowCountEquals, assertWindowPresent, assertWindowPresent, assertWindowPresentWithTitle, beginAt, checkCheckbox, checkCheckbox, clickButton, clickButtonWithText, clickElementByXPath, clickLink, clickLinkWithExactText, clickLinkWithExactText, clickLinkWithImage, clickLinkWithText, clickLinkWithText, clickRadioOption, closeBrowser, closeWindow, dumpCookies, dumpHtml, dumpHtml, dumpTable, dumpTable, getAllHeaders, getComments, getDialog, getElementAttributByXPath, getElementAttributeByXPath, getElementById, getElementByXPath, getElementsByXPath, getElementTextByXPath, getFieldsForLabel, getFormElementValue, getHeader, getImage, getLabeledFieldValue, getMessage, getMessage, getPageSource, getServerResponse, getServeurResponse, getTable, getTestContext, getTester, getTestingEngine, getTestingEngineKey, gotoFrame, gotoPage, gotoRootWindow, gotoWindow, gotoWindow, gotoWindowByTitle, reset, runBare, saveAs, selectOption, selectOption, selectOptionByValue, selectOptionByValue, selectOptions, selectOptions, selectOptionsByValues, selectOptionsByValues, setBaseUrl, setBaseUrl, setDialog, setExpectedJavaScriptAlert, setExpectedJavaScriptAlert, setExpectedJavaScriptConfirm, setExpectedJavaScriptConfirm, setExpectedJavaScriptPrompt, setExpectedJavaScriptPrompt, setFormElement, setHiddenField, setIgnoreFailingStatusCodes, setLabeledFormElementField, setScriptingEnabled, setTestContext, setTestingEngineKey, setTextField, setTimeout, setWorkingForm, setWorkingForm, setWorkingForm, submit, submit, submit, tearDown, uncheckCheckbox, uncheckCheckbox
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runTest, setName, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame, format
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WebAssertionsTest

public WebAssertionsTest()
Method Detail

suite

public static junit.framework.Test suite()

setUp

public void setUp()
           throws java.lang.Exception
Overrides:
setUp in class JWebUnitAPITestCase
Throws:
java.lang.Exception

testAssertTitleEquals

public void testAssertTitleEquals()
                           throws java.lang.Throwable
Throws:
java.lang.Throwable

testAssertTitleMatch

public void testAssertTitleMatch()
                          throws java.lang.Throwable
Throws:
java.lang.Throwable

testAssertTextPresent

public void testAssertTextPresent()
                           throws java.lang.Throwable
Throws:
java.lang.Throwable

testAssertMatch

public void testAssertMatch()
                     throws java.lang.Throwable
Throws:
java.lang.Throwable

testAssertTextNotPresent

public void testAssertTextNotPresent()
                              throws java.lang.Throwable
Throws:
java.lang.Throwable

testAssertNoMatch

public void testAssertNoMatch()
                       throws java.lang.Throwable
Throws:
java.lang.Throwable

testAssertNoMatchFails

public void testAssertNoMatchFails()
                            throws java.lang.Throwable
Check that WebTestCase.assertNoMatch(String) can actually fail.

Throws:
java.lang.Throwable

testAssertLinkPresentWithText

public void testAssertLinkPresentWithText()
                                   throws java.lang.Throwable
Throws:
java.lang.Throwable

testAssertLinkNotPresentWithText

public void testAssertLinkNotPresentWithText()
                                      throws java.lang.Throwable
Throws:
java.lang.Throwable

testAssertLinkPresentWithTextN

public void testAssertLinkPresentWithTextN()
                                    throws java.lang.Throwable
Throws:
java.lang.Throwable

testAssertLinkNotPresentWithTextN

public void testAssertLinkNotPresentWithTextN()
                                       throws java.lang.Throwable
Throws:
java.lang.Throwable

testAssertLinkPresent

public void testAssertLinkPresent()
                           throws java.lang.Throwable
Throws:
java.lang.Throwable

testAssertLinkNotPresent

public void testAssertLinkNotPresent()
                              throws java.lang.Throwable
Throws:
java.lang.Throwable

testAssertLinkPresentWithImage

public void testAssertLinkPresentWithImage()
                                    throws java.lang.Throwable
Throws:
java.lang.Throwable

testAssertLinkNotPresentWithImage

public void testAssertLinkNotPresentWithImage()
                                       throws java.lang.Throwable
Throws:
java.lang.Throwable

testAssertElementPresent

public void testAssertElementPresent()
                              throws java.lang.Throwable
Throws:
java.lang.Throwable

testAssertElementNotPresent

public void testAssertElementNotPresent()
                                 throws java.lang.Throwable
Throws:
java.lang.Throwable

testAssertTextNotInElement

public void testAssertTextNotInElement()
                                throws java.lang.Throwable
Throws:
java.lang.Throwable

testAssertElementContainsText

public void testAssertElementContainsText()
                                   throws java.lang.Throwable
Throws:
java.lang.Throwable

testAssertElementContainsTextInChild

public void testAssertElementContainsTextInChild()
                                          throws java.lang.Throwable
Throws:
java.lang.Throwable

testAssertNoMatchInElement

public void testAssertNoMatchInElement()
                                throws java.lang.Throwable
Throws:
java.lang.Throwable

testAssertMatchInElement

public void testAssertMatchInElement()
                              throws java.lang.Throwable
Throws:
java.lang.Throwable

testAssertMatchInElementChild

public void testAssertMatchInElementChild()
                                   throws java.lang.Throwable
Throws:
java.lang.Throwable

testAssertFormElementEquals

public void testAssertFormElementEquals()
                                 throws java.lang.Throwable
Deprecated. 

Throws:
java.lang.Throwable

testAssertTextFieldEquals

public void testAssertTextFieldEquals()
                               throws java.lang.Throwable
Throws:
java.lang.Throwable

testAssertHiddenFieldPresent

public void testAssertHiddenFieldPresent()
                                  throws java.lang.Throwable
Throws:
java.lang.Throwable

testAssertFormElementMatch

public void testAssertFormElementMatch()
                                throws java.lang.Throwable
Throws:
java.lang.Throwable

testAssertSelectedOptionEquals

public void testAssertSelectedOptionEquals()
                                    throws java.lang.Throwable
Throws:
java.lang.Throwable

testAssertSelectedOptionMatch

public void testAssertSelectedOptionMatch()
                                   throws java.lang.Throwable
Throws:
java.lang.Throwable


Copyright © 2002-2011 SourceForge. All Rights Reserved.