Examples of TestObject


Examples of ch.ralscha.extdirectspring.provider.RemoteProviderSimpleNamed.TestObject

  @Test
  public void testCollections() {
    Map<String, Object> params = new LinkedHashMap<String, Object>();
    params.put("name", "first");
    TestObject ce = new TestObject(23, "Meier", Boolean.FALSE, new BigDecimal(
        "100.23"));
    params.put("collections", Collections.singleton(ce));
    String result = (String) ControllerUtil.sendAndReceiveNamed(mockMvc,
        "remoteProviderSimpleNamed", "methodCollection1", String.class, params);
    assertThat(result).isEqualTo(
        "1->first;[TestObject [id=23, name=Meier, active=false, amount=100.23]]");

    params = new LinkedHashMap<String, Object>();
    params.put("name", "2nd");
    List<TestObject> list = new ArrayList<TestObject>();
    list.add(new TestObject(1, "One", Boolean.TRUE, new BigDecimal("1.1")));
    list.add(new TestObject(2, "Two", Boolean.FALSE, new BigDecimal("1.2")));
    list.add(new TestObject(3, "Three", Boolean.TRUE, new BigDecimal("1.3")));

    params.put("collections", list);
    result = (String) ControllerUtil.sendAndReceiveNamed(mockMvc,
        "remoteProviderSimpleNamed", "methodCollection1", String.class, params);
    assertThat(result)
View Full Code Here

Examples of com.base2art.jeqll.sampleData.TestObject

  @Test
  public void shouldLoad()
  {
    IQuery<TestObject> query = new IterableQuery<>(TestObjectRepository.createList(3), TestObject.class);
    TestObject to = query.where(new EqualityMatcher<>("index", 0)).first();
    assertThat(to).isNotNull();
  }
View Full Code Here

Examples of com.sun.jini.test.spec.security.util.TestObject

     * This method performs all actions mentioned in class description.
     *
     */
    public void run() throws Exception {
        File jarFile = null;
        Object testObj = new TestObject();
        Collection testCtx = new ArrayList();
        testCtx.add(new Object());
        boolean[] useNullLoader = new boolean[] { true, false };
        Class[][] clNames = new Class[][] {
            new Class[] {
View Full Code Here

Examples of hudson.tasks.test.TestObject

  public static String getTestUrl(hudson.tasks.test.TestResult result) {
    String buildUrl = getBuildURL(result.getOwner());
    @SuppressWarnings("rawtypes")
        AbstractTestResultAction action = result.getTestResultAction();
   
    TestObject parent = result.getParent();
    TestResult testResultRoot = null;
    while(parent != null) {
      if (parent instanceof TestResult) {
        testResultRoot = (TestResult) parent;
        break;
      }
      parent = parent.getParent();
    }
   
    String testUrl = action.getUrlName()
      + (testResultRoot != null ? testResultRoot.getUrl() : "")
      + result.getUrl();
View Full Code Here

Examples of mungbean.TestObject

            context.dbAdmin().dropDatabase();
        }

        public void objectWithoutIdCanBeStoredAndRetrieved() {
            DBCollection<TestObject> collection = context.openCollection("foo", TestObject.class);
            collection.save(new TestObject("foo", 123));
            List<TestObject> objs = collection.query(new Query().field("name").is("foo"));
            specify(objs.size(), does.equal(1));
            specify(objs.get(0).name(), does.equal("foo"));
        }
View Full Code Here

Examples of org.apache.harmony.rmi.test.TestObject

     */
    private void runTestServer0(int config) throws Exception {
        System.err.println("Test server started");
        System.setSecurityManager(new RMISecurityManager());
        setEnvironmentForConfig(config);
        MyRemoteInterface1 obj = new TestObject();
        UnicastRemoteObject.exportObject(obj, CUSTOM_PORT_4);
        LocateRegistry.getRegistry().rebind(
                TEST_STRING_1, RemoteObject.toStub(obj));
        GCThread.create();
        System.err.println("Test server initialized, telling READY to parent");
View Full Code Here

Examples of org.apache.tuscany.sca.binding.corba.testing.generated.TestObject

     * Tests structures (arguments, return types)
     */
    @Test
    public void test_TestObject_setStruct() {
        try {
            TestObject to = new TestObjectServant();
            TestRuntimeComponentService service = new TestRuntimeComponentService(to);
            Class<?> javaClass = ((JavaInterface)service.getInterfaceContract().getInterface()).getJavaClass();
            InvocationProxy proxy = new ComponentInvocationProxy((RuntimeEndpoint) service.getEndpoints().get(0), javaClass);
            DynaCorbaServant servant = new DynaCorbaServant(proxy, Utils.getTypeId(javaClass));
            String[] ids = new String[] {"IDL:org/apache/tuscany/sca/binding/corba/testing/generated/TestObject:1.0"};
            servant.setIds(ids);
            bindServant(servant, "TestObject");
            TestObject testObject = TestObjectHelper.narrow(bindReference("TestObject"));
            SomeStruct ss = new SomeStruct();
            SimpleStruct inner = new SimpleStruct();
            inner.field1 = TestConstants.STR_1;
            inner.field2 = TestConstants.INT_1;
            ss.innerStruct = inner;
            ss.str = TestConstants.STR_2;
            ss.str_list = TestConstants.STR_ARR_1;
            ss.threeDimSeq = TestConstants.INT_ARRAY_3_DIM;
            ss.twoDimSeq = TestConstants.INT_ARRAY_2_DIM;
            SomeStruct result = testObject.setStruct(ss);
            assertTrue(TestConstants.are2DimArraysEqual(result.twoDimSeq, TestConstants.INT_ARRAY_2_DIM));
            assertTrue(TestConstants.are3DimArraysEqual(result.threeDimSeq, TestConstants.INT_ARRAY_3_DIM));
            assertTrue(result.str.equals(ss.str));
            assertTrue(result.innerStruct.field1.equals(ss.innerStruct.field1));
            assertTrue(result.innerStruct.field2 == ss.innerStruct.field2);
View Full Code Here

Examples of org.apache.tuscany.sca.binding.corba.testing.generated.TestObject

            InvocationProxy proxy = new ComponentInvocationProxy((RuntimeEndpoint) service.getEndpoints().get(0), javaClass);
            DynaCorbaServant servant = new DynaCorbaServant(proxy, Utils.getTypeId(javaClass));
            String[] ids = new String[] {"IDL:org/apache/tuscany/sca/binding/corba/testing/generated/TestObject:1.0"};
            servant.setIds(ids);
            bindServant(servant, "InvalidTestObject");
            TestObject to = TestObjectHelper.narrow(bindReference("InvalidTestObject"));
            SomeStruct str = new SomeStruct();
            str.innerStruct = new SimpleStruct();
            str.innerStruct.field1 = "Whatever";
            str.str = "Whatever";
            str.str_list = new String[] {};
            str.threeDimSeq = new int[][][] {};
            str.twoDimSeq = new int[][] {};
            to.setStruct(str);
        } catch (Exception e) {
            if (e instanceof BAD_OPERATION) {
                assertTrue(true);
            } else {
                e.printStackTrace();
View Full Code Here

Examples of org.apache.wicket.injection.util.TestObject

  /**
   * Test injection
   */
  public void testInjection()
  {
    TestObject testObject = new TestObject();

    Injector.getInstance().inject(testObject, factory);

    assertEquals(testObject.getDependency1().getMessage(), "inject");
    assertEquals(testObject.getDependency2().getMessage(), "dont-inject");
    assertEquals(testObject.getDependency3().getMessage(), "dont-inject");
    assertEquals(testObject.getDependency4().getMessage(), "inject");
  }
View Full Code Here

Examples of org.dozer.vo.TestObject

  }

  @Test
  public void testMapToMap() throws Exception {
    Mapper mapper = getMapper(new String[] { "mapInterfaceMapping.xml", "dozerBeanMapping.xml" });
    TestObject to = newInstance(TestObject.class);
    to.setOne("one");
    TestObject to2 = newInstance(TestObject.class);
    to2.setTwo(new Integer(2));
    Map<String, TestObject> map = newInstance(HashMap.class);
    map.put("to", to);
    map.put("to2", to2);

    Map<String, TestObject> map2 = newInstance(HashMap.class);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.