package com.alibaba.json.bvt.parser.deser;

import org.junit.Assert;

import com.alibaba.fastjson.JSON;

import junit.framework.TestCase;


public class SmartMatchTest_boolean_is extends TestCase {
    
    public void f_test_0 () throws Exception {
        String text = "{\"_id\":1001}";
        
        VO vo = JSON.parseObject(text, VO.class);
        Assert.assertEquals(1001, vo.getId());
    }
    
    public void test_vo2 () throws Exception {
        String text = "{\"_id\":1001}";
        
        VO2 vo = JSON.parseObject(text, VO2.class);
        Assert.assertEquals(1001, vo.getId());
    }

    private static class VO {

        private int id;

        public int getId() {
            return id;
        }

        public void setId(int id) {
            this.id = id;
        }

    }
    
    public static class VO2 {

        private int id;

        public int getId() {
            return id;
        }

        public void setId(int id) {
            this.id = id;
        }

    }
}

@@ -216,17 +216,14 @@
 oid 
-f_
 test_0
- 
 () t
@@ -270,234 +270,28 @@
 %22%7B%5C%22
-_id%5C%22:1001%7D%22;%0A        %0A        VO vo = JSON.parseObject(text, VO.class);%0A        Assert.assertEquals(1001, vo.getId());%0A    %7D%0A    %0A    public void test_vo2 () throws Exception %7B%0A        String text = %22%7B%5C%22_id%5C%22:1001%7D%22;%0A        
+isVisible%5C%22:true%7D%22;%0A
 %0A   
@@ -297,17 +297,16 @@
       VO
-2
  vo = JS
@@ -328,17 +328,16 @@
 text, VO
-2
 .class);
@@ -369,22 +369,26 @@
 als(
-1001
+true
 , vo.
-getId
+isVisible
 ());
@@ -400,22 +400,21 @@
 %7D%0A%0A    p
-rivate
+ublic
  static 
@@ -445,244 +445,58 @@
 ate 
-int id;%0A%0A        public int getId() %7B%0A            return id;%0A        %7D%0A%0A        public void setId(int id) %7B%0A            this.id = id;%0A        %7D%0A%0A    %7D%0A    %0A    public static class VO2 %7B%0A%0A        private int id;%0A%0A        public int getId
+boolean visible;%0A%0A        public boolean isVisible
 () %7B
@@ -515,18 +515,23 @@
  return 
-id
+visible
 ;%0A      
@@ -562,17 +562,31 @@
  set
-Id(int id
+Visible(boolean visible
 ) %7B%0A
@@ -606,15 +606,25 @@
 his.
-id = id
+visible = visible
 ;%0A  

add testcase for issue #694