/*
 * Copyright (c) 2008 Haulmont Technology Ltd. All Rights Reserved.
 * Haulmont Technology proprietary and confidential.
 * Use is subject to license terms.

 * Author: Dmitry Abramov
 * Created: 16.02.2009 12:09:16
 * $Id$
 */
package com.haulmont.cuba;

import com.haulmont.cuba.core.CubaTestCase;
import com.haulmont.cuba.core.entity.Server;
import com.haulmont.chile.core.model.Instance;
import com.haulmont.chile.core.common.ValueListener;

public class CubaEnchancerTest extends CubaTestCase {
    public void testListeners() {
        final Server server1 = new Server();
        final Server server2 = new Server();

        ((Instance) server1).addListener(new ValueListener() {
            public void propertyChanged(Object item, String property, Object prevValue, Object value) {
                if ("name".equals(property)) {
                    server2.setName((String) value);
                }
            }
        });

        server1.setName("server1");

        assertEquals(server1.getName(), server2.getName());
    }
}

@@ -544,24 +544,64 @@
 teners() %7B%0D%0A
+        // temporarily commented out%0D%0A//
         fina
@@ -630,24 +630,26 @@
  Server();%0D%0A
+//
         fina
@@ -678,26 +678,30 @@
  Server();%0D%0A
-%0D%0A
+//%0D%0A//
         ((In
@@ -748,24 +748,26 @@
 stener() %7B%0D%0A
+//
             
@@ -855,24 +855,26 @@
 t value) %7B%0D%0A
+//
             
@@ -905,24 +905,26 @@
 operty)) %7B%0D%0A
+//
             
@@ -961,24 +961,26 @@
 g) value);%0D%0A
+//
             
@@ -978,32 +978,34 @@
              %7D%0D%0A
+//
             %7D%0D%0A 
@@ -1003,16 +1003,18 @@
      %7D%0D%0A
+//
         
@@ -1014,26 +1014,30 @@
        %7D);%0D%0A
-%0D%0A
+//%0D%0A//
         serv
@@ -1061,18 +1061,22 @@
 er1%22);%0D%0A
-%0D%0A
+//%0D%0A//
         

Test temporarily commented out