Package org.monjo.document

Source Code of org.monjo.document.DirtyWatcherAspectTest

package org.monjo.document;

import static org.junit.Assert.assertThat;
import static org.junit.Assert.assertEquals;
import static org.junit.matchers.JUnitMatchers.hasItems;
import java.util.Set;

import org.junit.Test;
import org.monjo.example.SimplePOJO;


public class DirtyWatcherAspectTest {
 
 
  @Test
  public void shouldVerifyFieldCalling(){
    SimplePOJO simplePOJO = new SimplePOJO();
    simplePOJO.setaDoubleField(10.0);
    DirtFieldsWatcher monjoObject = (DirtFieldsWatcher) simplePOJO;
    Set<String> dirtFields = monjoObject.dirtFields();
    assertEquals(1, dirtFields.size());
    assertThat(dirtFields, hasItems("setaDoubleField"));
  }
}
TOP

Related Classes of org.monjo.document.DirtyWatcherAspectTest

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.