Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 8F670200B16 for ; Mon, 20 Jun 2016 13:19:41 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 8E253160A55; Mon, 20 Jun 2016 11:19:41 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id D82E1160A24 for ; Mon, 20 Jun 2016 13:19:40 +0200 (CEST) Received: (qmail 10625 invoked by uid 500); 20 Jun 2016 11:19:40 -0000 Mailing-List: contact commits-help@ignite.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ignite.apache.org Delivered-To: mailing list commits@ignite.apache.org Received: (qmail 10616 invoked by uid 99); 20 Jun 2016 11:19:40 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 20 Jun 2016 11:19:40 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id C3964DFC6F; Mon, 20 Jun 2016 11:19:39 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: akuznetsov@apache.org To: commits@ignite.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: ignite git commit: IGNITE-3277 Added test for simple class with public fields and without getters and setters. Date: Mon, 20 Jun 2016 11:19:39 +0000 (UTC) archived-at: Mon, 20 Jun 2016 11:19:41 -0000 Repository: ignite Updated Branches: refs/heads/ignite-3277 1de04e7dc -> a9cbffc4b IGNITE-3277 Added test for simple class with public fields and without getters and setters. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/a9cbffc4 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/a9cbffc4 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/a9cbffc4 Branch: refs/heads/ignite-3277 Commit: a9cbffc4b1dfe546fab8ee16a8a6ee45182d74fd Parents: 1de04e7 Author: Alexey Kuznetsov Authored: Mon Jun 20 18:17:05 2016 +0700 Committer: Alexey Kuznetsov Committed: Mon Jun 20 18:17:05 2016 +0700 ---------------------------------------------------------------------- .../JettyRestProcessorAbstractSelfTest.java | 13 +++++ .../internal/processors/rest/SimplePerson.java | 59 ++++++++++++++++++++ 2 files changed, 72 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/a9cbffc4/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/JettyRestProcessorAbstractSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/JettyRestProcessorAbstractSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/JettyRestProcessorAbstractSelfTest.java index 6fcc398..70d30fb 100644 --- a/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/JettyRestProcessorAbstractSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/JettyRestProcessorAbstractSelfTest.java @@ -339,6 +339,19 @@ public abstract class JettyRestProcessorAbstractSelfTest extends AbstractRestPro /** * @throws Exception If failed. */ + public void testSimpleObject() throws Exception { + SimplePerson p = new SimplePerson(1, "Test", java.sql.Date.valueOf("1977-01-26"), 1000.55); + + jcache().put("simplePersonKey", p); + + String ret = content(F.asMap("cmd", GridRestCommand.CACHE_GET.key(), "key", "simplePersonKey")); + + info("Get command result: " + ret); + } + + /** + * @throws Exception If failed. + */ public void testDate() throws Exception { java.util.Date utilDate = new java.util.Date(); http://git-wip-us.apache.org/repos/asf/ignite/blob/a9cbffc4/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/SimplePerson.java ---------------------------------------------------------------------- diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/SimplePerson.java b/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/SimplePerson.java new file mode 100644 index 0000000..119e873 --- /dev/null +++ b/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/SimplePerson.java @@ -0,0 +1,59 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.internal.processors.rest; + +import java.sql.Date; + +/** + * Test class with public fields and without getters and setters. + */ +public class SimplePerson { + /** Person ID. */ + public int id; + + /** Person name. */ + public String name; + + /** Person birthday. */ + public Date birthday; + + /** Person salary. */ + public double salary; + + /** + * Default constructor. + */ + public SimplePerson() { + // No-op. + } + + /** + * Full constructor. + * + * @param id Person ID. + * @param name Person name. + * @param birthday Person birthday. + * @param salary Person salary. + */ + public SimplePerson(int id, String name, Date birthday, double salary) { + this.id = id; + this.name = name; + this.birthday = birthday; + this.salary = salary; + } +}