Package org.drools.guvnor.server

Source Code of org.drools.guvnor.server.TestModuleFilterTest

package org.drools.guvnor.server;

import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;

import org.drools.guvnor.client.rpc.Module;
import org.junit.Test;

public class TestModuleFilterTest {
    @Test
    public void testAssetItemFilterAndDoesNotAccept() {
        ModuleFilter filter = new ModuleFilter(null);
        assertFalse( filter.accept( new Object(),
                                    "action" ) );
    }

    @Test
    public void testAssetItemFilterAndAccepts() {
        ModuleFilter filter = new ModuleFilter(null);
        assertTrue( filter.accept( new Module(),
                                   "action" ) );
    }

    @Test
    public void testIsNullSafe() {
        ModuleFilter filter = new ModuleFilter(null);
        assertFalse( filter.accept( null,
                                    null ) );
    }
}
TOP

Related Classes of org.drools.guvnor.server.TestModuleFilterTest

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.