TAS-188 add autowired capability and parallel execution

This commit is contained in:
Paul Brodner
2016-08-04 14:58:19 +03:00
parent d3507fa904
commit 19c7436c36
4 changed files with 72 additions and 33 deletions

View 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");
}
}