Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.kie.workbench.common.services.datamodel.backend.server;
 
 import java.util.Set;
 
 import  org.drools.workbench.models.datamodel.oracle.ModelField;
 
 import static org.junit.Assert.*;

Utility methods for DataModelOracle tests
    public static void assertContainsfinal String string,
                                       final String[] strings ) {
        for ( int i = 0; i < strings.lengthi++ ) {
            if ( string.equalsstringsi ] ) ) {
                return;
            }
        }
        fail"String[] did not contain: " + string );
    }
    public static void assertContainsfinal String string,
                                       final Set<Stringstrings ) {
        if ( !strings.containsstring ) ) {
            fail"Set<String> did not contain: " + string );
        }
    }
    public static void assertContainsfinal String fieldName,
                                       final ModelField[] fieldDefinitions ) {
        for ( int i = 0; i < fieldDefinitions.length; i++ ) {
            if ( fieldName.equalsfieldDefinitionsi ].getName() ) ) {
                return;
            }
        }
        fail"ModelField[] did not contain field: " + fieldName );
    }
New to GrepCode? Check out our FAQ X