mirror of
https://github.com/Alfresco/SearchServices.git
synced 2025-09-17 14:21:20 +00:00
TAS-188 add autowired capability and parallel execution
This commit is contained in:
31
e2e-test/java/org/alfresco/rest/SampleBTest.java
Normal file
31
e2e-test/java/org/alfresco/rest/SampleBTest.java
Normal file
@@ -0,0 +1,31 @@
|
||||
package org.alfresco.rest;
|
||||
|
||||
import org.alfresco.rest.v1.Sites;
|
||||
import org.alfresco.tester.model.UserModel;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.testng.Assert;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
public class SampleBTest extends BaseRestTest
|
||||
{
|
||||
@Autowired
|
||||
Sites onSites;
|
||||
|
||||
@Test
|
||||
public void sampleBTestMethod1()
|
||||
{
|
||||
UserModel admin = new UserModel("admin", "admin");
|
||||
Assert.assertFalse(onSites.withAuthUser(admin).getSites().getEntries().isEmpty(), "We have sites");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void sampleBTestMethod2()
|
||||
{
|
||||
UserModel admin = new UserModel("admin", "a");
|
||||
Assert.assertTrue(onSites.withAuthUser(admin).getSites().getEntries().isEmpty(), "We have sites");
|
||||
|
||||
Assert.assertEquals(onSites.usingRestWrapper().getLastStatus().getName().toLowerCase(), HttpStatus.UNAUTHORIZED.name().toLowerCase(), "Status Code Name");
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user