Package ch.ralscha.extdirectspring.provider

Examples of ch.ralscha.extdirectspring.provider.Row


  }

  @Test
  public void testUpdateWithRequestParamSingle() throws Exception {
    Map<String, Object> storeRequest = new LinkedHashMap<String, Object>();
    Row row = new Row(10, "Ralph", true, "109.55");
    storeRequest.put("aParam", 42);
    storeRequest.putAll(ControllerUtil.convertValue(row, Map.class));
    executeUpdate("remoteProviderStoreModifySingle", storeRequest, "update2");
  }
View Full Code Here


  }

  @Test
  public void testUpdateWithRequestParamDefaultValueSingle() throws Exception {
    Map<String, Object> storeRequest = new LinkedHashMap<String, Object>();
    Row row = new Row(10, "Ralph", true, "109.55");
    storeRequest.putAll(ControllerUtil.convertValue(row, Map.class));
    executeUpdate("remoteProviderStoreModifySingle", storeRequest, "update3");
  }
View Full Code Here

  }

  @Test
  public void testUpdateWithRequestParamOptionalSingle() throws Exception {
    Map<String, Object> storeRequest = new LinkedHashMap<String, Object>();
    Row row = new Row(10, "Ralph", true, "109.55");
    storeRequest.putAll(ControllerUtil.convertValue(row, Map.class));
    executeUpdate("remoteProviderStoreModifySingle", storeRequest, "update4");

    storeRequest = new LinkedHashMap<String, Object>();
    storeRequest.putAll(ControllerUtil.convertValue(row, Map.class));
View Full Code Here

      assertThat(storeResponse.get(0).isAdmin()).isTrue();
      assertThat(storeResponse.get(0).getSalary()).isEqualTo(
          new BigDecimal("109.55"));
    }
    else {
      Row storeResponse = ControllerUtil.convertValue(result, Row.class);
      assertThat(storeResponse.getId()).isEqualTo(10);
      assertThat(storeResponse.getName()).isEqualTo("Ralph");
      assertThat(storeResponse.isAdmin()).isTrue();
      assertThat(storeResponse.getSalary()).isEqualTo(new BigDecimal("109.55"));
    }
  }
View Full Code Here

  public static void assert100Rows(List<Row> rows, String appendix) {
    assertThat(rows.size()).isEqualTo(100);

    for (int i = 0; i < rows.size(); i += 2) {
      assertThat(rows.get(i)).isEqualTo(
          new Row(i, "name: " + i + appendix, true, "" + (1000 + i)));
      assertThat(rows.get(i + 1)).isEqualTo(
          new Row(i + 1, "firstname: " + (i + 1) + appendix, false, ""
              + (10 + i + 1)));
    }
  }
View Full Code Here

        "remoteProviderImplementation", "storeRead",
        new TypeReference<List<Row>>() {/* nothing_here */
        }, readRequest);

    assertThat(rows).hasSize(1);
    Row theRow = rows.get(0);
    assertThat(theRow.getId()).isEqualTo(1);
    assertThat(theRow.getName()).isEqualTo("Smith");
    assertThat(theRow.getSalary()).isEqualTo(new BigDecimal("40"));
  }
View Full Code Here

    assertThat(resultMap.get("remoteAddr")).isEqualTo("127.0.0.1");
  }

  @Test
  public void testTypeConversionWithObjects() {
    Row aRow = new Row(104, "myRow", true, "100.45");
    ControllerUtil.sendAndReceive(mockMvc, "remoteProviderSimple", "method12",
        "Row [id=104, name=myRow, admin=true, salary=100.45]", aRow);
  }
View Full Code Here

        params);
  }

  @Test
  public void testTypeConversionWithObjects() {
    Row aRow = new Row(104, "myRow", true, "100.45");
    Map<String, Object> params = new LinkedHashMap<String, Object>();
    params.put("aRow", aRow);
    ControllerUtil.sendAndReceiveNamed(mockMvc, "remoteProviderSimpleNamed",
        "method9", "Row [id=104, name=myRow, admin=true, salary=100.45]", params);
  }
View Full Code Here

TOP

Related Classes of ch.ralscha.extdirectspring.provider.Row

Copyright © 2018 www.massapicom. 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.