// Path: src/main/java/com/yanglinkui/ab/dsl/Number.java
// public class Number implements Value<BigDecimal> {
// 
//     private final BigDecimal value;
// 
//     public Number(BigDecimal value) {
//         this.value = value;
//     }
// 
//     public BigDecimal getValue() {
//         return this.value;
//     }
// 
//     @Override
//     public String toString() {
//         return "Number: " + this.value;
//     }
// }


import com.yanglinkui.ab.dsl.*;
import com.yanglinkui.ab.dsl.Number;
import org.junit.Test;
import java.math.BigDecimal;
import java.util.HashSet;
import static org.mockito.Mockito.*;
import static junit.framework.Assert.*;
package com.yanglinkui.ab.dsl;




/**
 * Created by jonas on 2017/1/8.
 */
public class TestEqual {

    @Test
    public void testInterpretByNumber() {
        Variable s1Version = new Variable("s1.version");
        Context s1VersionContext = mock(Context.class);
        when(s1VersionContext.getValue(s1Version)).thenReturn("1.2");

        Equal equal = new Equal();
        equal.setVariable(s1Version);
// Path: src/main/java/com/yanglinkui/ab/dsl/Number.java
// public class Number implements Value<BigDecimal> {
// 
//     private final BigDecimal value;
// 
//     public Number(BigDecimal value) {
//         this.value = value;
//     }
// 
//     public BigDecimal getValue() {
//         return this.value;
//     }
// 
//     @Override
//     public String toString() {
//         return "Number: " + this.value;
//     }
// }


// Path: src/test/java/com/yanglinkui/ab/dsl/TestEqual.java
import com.yanglinkui.ab.dsl.*;
import com.yanglinkui.ab.dsl.Number;
import org.junit.Test;
import java.math.BigDecimal;
import java.util.HashSet;
import static org.mockito.Mockito.*;
import static junit.framework.Assert.*;

package com.yanglinkui.ab.dsl;




/**
 * Created by jonas on 2017/1/8.
 */
public class TestEqual {

    @Test
    public void testInterpretByNumber() {
        Variable s1Version = new Variable("s1.version");
        Context s1VersionContext = mock(Context.class);
        when(s1VersionContext.getValue(s1Version)).thenReturn("1.2");

        Equal equal = new Equal();
        equal.setVariable(s1Version);
        equal.setValue(new com.yanglinkui.ab.dsl.Number(new BigDecimal("1")));