Package com.googlecode.gwt.test.internal

Source Code of com.googlecode.gwt.test.internal.AutomaticPatcherTest

package com.googlecode.gwt.test.internal;

import static org.junit.Assert.assertEquals;

import org.junit.Before;
import org.junit.Test;

import com.googlecode.gwt.test.GwtTestTest;
import com.googlecode.gwt.test.internal.MyClassToPatch.MyInnerClass;

public class AutomaticPatcherTest extends GwtTestTest {

   private MyClassToPatch instance;

   @Before
   public void beforeAutomaticPatcherTest() {
      instance = new MyClassToPatch();
   }

   @Test
   public void checkPatchWithInnerClassAndMultiplePatchers() throws Exception {
      // Arrange
      MyInnerClass innerObject = new MyInnerClass("innerOjbectForUnitTest");

      // Act
      String result = instance.myStringMethod(innerObject);

      // Assert
      assertEquals(
               "myStringMethod has been patched by override patcher : patched by MyInnerClassOverridePatcher : new field added in overrided init",
               result);
   }

}
TOP

Related Classes of com.googlecode.gwt.test.internal.AutomaticPatcherTest

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.