import Filter from 'dasf-web/lib/map/model/Filter';

describe("Test FilterExpression", ()=>{

    var cut: Filter = new Filter();
    
    test("check simple expression >20", ()=>{
        cut.setThreshold(15,40);
        expect(cut.filter(25)).toBeTruthy();
    });

    test("check simple expression =20", ()=>{
        cut.setThreshold(20,20);
        expect(cut.filter(20)).toBeTruthy();
    });

    test("check simple expression <5", ()=>{
        cut.setThreshold(0,5);
        expect(cut.filter(2)).toBeTruthy();
    });

    test("check simple expression =5", ()=>{
        cut.setThreshold(5,5);

        expect(cut.filter(5)).toBeTruthy();
    });

    test("check simple expression >5", ()=>{
        cut.setThreshold(5,20);

        expect(cut.filter(5.5)).toBeTruthy();
    });
    
});