org.alfresco.repo.web.scripts
Class LoginTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.alfresco.repo.web.scripts.BaseWebScriptTest
              extended by org.alfresco.repo.web.scripts.LoginTest
All Implemented Interfaces:
junit.framework.Test

public class LoginTest
extends BaseWebScriptTest

Junit test for login / logout and validate web scripts testing uri /api/login


Nested Class Summary
 
Nested classes/interfaces inherited from class org.alfresco.repo.web.scripts.BaseWebScriptTest
BaseWebScriptTest.BaseWebScriptTestListener, BaseWebScriptTest.HttpMethodResponse, BaseWebScriptTest.PatchMethod, BaseWebScriptTest.RemoteServer, BaseWebScriptTest.WebScriptTestListener
 
Constructor Summary
LoginTest()
           
 
Method Summary
protected  void setUp()
           
protected  void tearDown()
           
 void testAuthentication()
          Positive test - login and retrieve a ticket via get - return xml, - via get method validate ticket logout fail to validate ticket fail to get ticket
 void testAuthenticationGetJSON()
          Positive test - login and retrieve a ticket, - via json method
 void testMissingParameters()
          Negative test - missing parameters
 void testPostLogin()
          Authenticate via a POST
 void testWrongPassword()
          Negative tests - wrong password
 
Methods inherited from class org.alfresco.repo.web.scripts.BaseWebScriptTest
getDefaultRunAs, getRemoteServer, getServer, isLogEnabled, log, sendLocalRequest, sendRemoteRequest, sendRequest, sendRequest, setCustomContext, setDefaultRunAs, setListener, setRemoteServer, setTraceReqRes
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, 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

LoginTest

public LoginTest()
Method Detail

setUp

protected void setUp()
              throws java.lang.Exception
Overrides:
setUp in class BaseWebScriptTest
Throws:
java.lang.Exception

tearDown

protected void tearDown()
                 throws java.lang.Exception
Overrides:
tearDown in class junit.framework.TestCase
Throws:
java.lang.Exception

testAuthentication

public void testAuthentication()
                        throws java.lang.Exception
Positive test - login and retrieve a ticket via get - return xml, - via get method validate ticket logout fail to validate ticket fail to get ticket

Throws:
java.lang.Exception

testAuthenticationGetJSON

public void testAuthenticationGetJSON()
                               throws java.lang.Exception
Positive test - login and retrieve a ticket, - via json method

Throws:
java.lang.Exception

testPostLogin

public void testPostLogin()
                   throws java.lang.Exception
Authenticate via a POST

Throws:
java.lang.Exception

testWrongPassword

public void testWrongPassword()
                       throws java.lang.Exception
Negative tests - wrong password

Throws:
java.lang.Exception

testMissingParameters

public void testMissingParameters()
                           throws java.lang.Exception
Negative test - missing parameters

Throws:
java.lang.Exception


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.