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;
}
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);
}
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);
}
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);
}
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();
}
Aggregations