Java Code Examples for codemining.java.codeutils.binding.BindingTester

The following examples show how to use codemining.java.codeutils.binding.BindingTester. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
@Test
public void testClassBindings() throws IOException {
	final JavascriptApproximateVariableBindingExtractor jabe = new JavascriptApproximateVariableBindingExtractor();
	final JavascriptExactVariableBindingsExtractor jbe = new JavascriptExactVariableBindingsExtractor();

	final List<TokenNameBinding> classVariableBindings = jabe
			.getNameBindings(classContent);
	final List<TokenNameBinding> classVariableBindingsExact = jbe
			.getNameBindings(classContent);

	BindingTester.checkAllBindings(classVariableBindings);
	assertEquals(classVariableBindings.size(), 3);

	final List<TokenNameBinding> classVariableBindings2 = jabe
			.getNameBindings(classContent2);
	final List<TokenNameBinding> classVariableBindings2Exact = jbe
			.getNameBindings(classContent2);

	assertEquals(classVariableBindings2.size(), 13);

	allAreContained(classVariableBindingsExact, classVariableBindings);
	allAreContained(classVariableBindings2Exact, classVariableBindings2);
}
 
Example 2
@Test
public void testClassBindings() throws IOException {
	final JavascriptApproximateVariableBindingExtractor jabe = new JavascriptApproximateVariableBindingExtractor();
	final JavascriptExactVariableBindingsExtractor jbe = new JavascriptExactVariableBindingsExtractor();

	final List<TokenNameBinding> classVariableBindings = jabe
			.getNameBindings(classContent);
	final List<TokenNameBinding> classVariableBindingsExact = jbe
			.getNameBindings(classContent);

	BindingTester.checkAllBindings(classVariableBindings);
	assertEquals(classVariableBindings.size(), 3);

	final List<TokenNameBinding> classVariableBindings2 = jabe
			.getNameBindings(classContent2);
	final List<TokenNameBinding> classVariableBindings2Exact = jbe
			.getNameBindings(classContent2);

	assertEquals(classVariableBindings2.size(), 13);

	allAreContained(classVariableBindingsExact, classVariableBindings);
	allAreContained(classVariableBindings2Exact, classVariableBindings2);
}
 
Example 3
@Test
public void testClassBindings() throws IOException {
	final JavascriptApproximateVariableBindingExtractor jabe = new JavascriptApproximateVariableBindingExtractor();
	final JavascriptExactVariableBindingsExtractor jbe = new JavascriptExactVariableBindingsExtractor();

	final List<TokenNameBinding> classVariableBindings = jabe
			.getNameBindings(classContent);
	final List<TokenNameBinding> classVariableBindingsExact = jbe
			.getNameBindings(classContent);

	BindingTester.checkAllBindings(classVariableBindings);
	assertEquals(classVariableBindings.size(), 3);

	final List<TokenNameBinding> classVariableBindings2 = jabe
			.getNameBindings(classContent2);
	final List<TokenNameBinding> classVariableBindings2Exact = jbe
			.getNameBindings(classContent2);

	assertEquals(classVariableBindings2.size(), 13);

	allAreContained(classVariableBindingsExact, classVariableBindings);
	allAreContained(classVariableBindings2Exact, classVariableBindings2);
}
 
Example 4
@Test
public void testMethodBinding() {
	final JavascriptApproximateVariableBindingExtractor jabe = new JavascriptApproximateVariableBindingExtractor();
	final List<TokenNameBinding> methodVariableBindings = jabe
			.getNameBindings(methodContent);
	BindingTester.checkAllBindings(methodVariableBindings);
	assertEquals(methodVariableBindings.size(), 1);

}
 
Example 5
@Test
public void testClassBindings() throws IOException {
	final JavascriptExactVariableBindingsExtractor jbe = new JavascriptExactVariableBindingsExtractor();
	final List<TokenNameBinding> classVariableBindings = jbe
			.getNameBindings(classContent);
	BindingTester.checkAllBindings(classVariableBindings);
	// assertEquals(classVariableBindings.size(), 1);

	final List<TokenNameBinding> classVariableBindings2 = jbe
			.getNameBindings(classContent2);

	// assertEquals(classVariableBindings2.size(), 3);
}
 
Example 6
@Test
public void testMethodBinding() {
	final JavascriptApproximateVariableBindingExtractor jabe = new JavascriptApproximateVariableBindingExtractor();
	final List<TokenNameBinding> methodVariableBindings = jabe
			.getNameBindings(methodContent);
	BindingTester.checkAllBindings(methodVariableBindings);
	assertEquals(methodVariableBindings.size(), 1);

}
 
Example 7
@Test
public void testClassBindings() throws IOException {
	final JavascriptExactVariableBindingsExtractor jbe = new JavascriptExactVariableBindingsExtractor();
	final List<TokenNameBinding> classVariableBindings = jbe
			.getNameBindings(classContent);
	BindingTester.checkAllBindings(classVariableBindings);
	// assertEquals(classVariableBindings.size(), 1);

	final List<TokenNameBinding> classVariableBindings2 = jbe
			.getNameBindings(classContent2);

	// assertEquals(classVariableBindings2.size(), 3);
}
 
Example 8
@Test
public void testMethodBinding() {
	final JavascriptApproximateVariableBindingExtractor jabe = new JavascriptApproximateVariableBindingExtractor();
	final List<TokenNameBinding> methodVariableBindings = jabe
			.getNameBindings(methodContent);
	BindingTester.checkAllBindings(methodVariableBindings);
	assertEquals(methodVariableBindings.size(), 1);

}
 
Example 9
@Test
public void testClassBindings() throws IOException {
	final JavascriptExactVariableBindingsExtractor jbe = new JavascriptExactVariableBindingsExtractor();
	final List<TokenNameBinding> classVariableBindings = jbe
			.getNameBindings(classContent);
	BindingTester.checkAllBindings(classVariableBindings);
	// assertEquals(classVariableBindings.size(), 1);

	final List<TokenNameBinding> classVariableBindings2 = jbe
			.getNameBindings(classContent2);

	// assertEquals(classVariableBindings2.size(), 3);
}