Package org.jzonic.jlo

Source Code of org.jzonic.jlo.TargetTest

/*
* TargetTest.java
* JUnit based test
*
* Created on 19. Januar 2003, 18:31
*/

package org.jzonic.jlo;

import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;

/**
*
* @author Administrator
*/
public class TargetTest extends TestCase {
   
    public TargetTest(java.lang.String testName) {
        super(testName);
    }
   
    public static void main(java.lang.String[] args) {
        junit.textui.TestRunner.run(suite());
    }
   
    public static Test suite() {
        TestSuite suite = new TestSuite(TargetTest.class);
        return suite;
    }
   
    public void testParseLine() {
        int value = Target.parse("ALL,INFO,!DEBUG");       
        assertEquals(251,value);
        value = Target.parse("ALL");       
        assertEquals(255,value);
        value = Target.parse("INFO");       
        assertEquals(2,value);
        value = Target.parse("INFO,!DEBUG");       
        assertEquals(2,value);
        value = Target.parse("OFF");
        assertEquals(0,value);
        value = Target.parse("OFF,INFO");
        assertEquals(0,value);
    }
   
   
}
TOP

Related Classes of org.jzonic.jlo.TargetTest

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.