PropertyChangeTest.java :  » REST » propidle » com » googlecode » propidle » versioncontrol » Java Open Source

Java Open Source » REST » propidle 
propidle » com » googlecode » propidle » versioncontrol » PropertyChangeTest.java
package com.googlecode.propidle.versioncontrol;

import com.googlecode.propidle.properties.PropertyComparison;
import org.junit.Test;

import static com.googlecode.propidle.properties.PropertyName.propertyName;
import static com.googlecode.propidle.properties.PropertyValue.propertyValue;
import static com.googlecode.propidle.properties.PropertyComparison.changedProperty;
import static org.hamcrest.CoreMatchers.equalTo;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.is;

public class PropertyChangeTest {
    @Test
    public void implementsEquality() {
        PropertyComparison base = changedProperty(propertyName("some.property"), propertyValue("old value"), propertyValue("new value"));
        PropertyComparison equivalent = changedProperty(propertyName("some.property"), propertyValue("old value"), propertyValue("new value"));
        
        assertThat(base, is(equalTo(equivalent)));
    }
}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.