Search in sources :

Example 1 with TestObject

use of org.eclipse.sw360.testthrift.TestObject in project sw360portal by sw360.

the class TestServiceHandler method test.

@Override
public TestObject test(TestObject user) throws TException {
    TestObject copy = new TestObject(user);
    copy.setText(testText);
    return copy;
}
Also used : TestObject(org.eclipse.sw360.testthrift.TestObject)

Example 2 with TestObject

use of org.eclipse.sw360.testthrift.TestObject in project sw360portal by sw360.

the class MapperFactoryTest method setUp.

@Before
public void setUp() throws Exception {
    // Prepare mapper
    MapperFactory factory = new MapperFactory(ImmutableList.<Class<?>>of(TestObject.class), Collections.<Class<?>>emptyList(), Maps.newHashMap());
    mapper = factory.createObjectMapper();
    // Prepare object
    object = new TestObject();
    object.setId(TEST_ID);
    object.setRevision(TEST_REV);
    object.setName(TEST_NAME);
}
Also used : TestObject(org.eclipse.sw360.testthrift.TestObject) Before(org.junit.Before)

Example 3 with TestObject

use of org.eclipse.sw360.testthrift.TestObject in project sw360portal by sw360.

the class DatabaseConnectorTest method testGetDocument.

@Test
public void testGetDocument() throws Exception {
    TestObject object1 = connector.get(TestObject.class, id);
    assertEquals(object, object1);
}
Also used : TestObject(org.eclipse.sw360.testthrift.TestObject) Test(org.junit.Test)

Example 4 with TestObject

use of org.eclipse.sw360.testthrift.TestObject in project sw360portal by sw360.

the class TestServiceHandlerTest method testTest.

@Test
public void testTest() throws Exception {
    TestObject returnValue = handler.test(object);
    assertNull(object.getText());
    assertEquals(returnValue.getText(), TestServiceHandler.testText);
}
Also used : TestObject(org.eclipse.sw360.testthrift.TestObject) Test(org.junit.Test)

Example 5 with TestObject

use of org.eclipse.sw360.testthrift.TestObject in project sw360portal by sw360.

the class TestServiceHandlerTest method setUp.

@Before
public void setUp() throws Exception {
    // Prepare object
    object = new TestObject();
    object.setId(TEST_ID);
    object.setRevision(TEST_REV);
    object.setName(TEST_NAME);
    // Prepare handler
    handler = new TestServiceHandler();
}
Also used : TestObject(org.eclipse.sw360.testthrift.TestObject) Before(org.junit.Before)

Aggregations

TestObject (org.eclipse.sw360.testthrift.TestObject)9 Test (org.junit.Test)5 Before (org.junit.Before)3 CouchDbConnector (org.ektorp.CouchDbConnector)1 CouchDbInstance (org.ektorp.CouchDbInstance)1 HttpClient (org.ektorp.http.HttpClient)1 StdHttpClient (org.ektorp.http.StdHttpClient)1 StdCouchDbConnector (org.ektorp.impl.StdCouchDbConnector)1 StdCouchDbInstance (org.ektorp.impl.StdCouchDbInstance)1