org.apache.flink.api.java.typeutils.PojoTypeExtractionTest.ComplexNestedClass Java Examples

The following examples show how to use org.apache.flink.api.java.typeutils.PojoTypeExtractionTest.ComplexNestedClass. 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
Source File: ExpressionKeysTest.java    From Flink-CEPplus with Apache License 2.0 6 votes vote down vote up
@Test
public void testInvalidPojo() throws Throwable {
	TypeInformation<ComplexNestedClass> ti = TypeExtractor.getForClass(ComplexNestedClass.class);

	String[][] tests = new String[][] {
		new String[] {"nonexistent"},
		new String[] {"date.abc"} // nesting into unnested
	};
	for (String[] test : tests) {
		Throwable e = null;
		try {
			new ExpressionKeys<>(test, ti);
		} catch (Throwable t) {
			e = t;
		}
		Assert.assertNotNull(e);
	}
}
 
Example #2
Source File: ExpressionKeysTest.java    From flink with Apache License 2.0 6 votes vote down vote up
@Test
public void testInvalidPojo() throws Throwable {
	TypeInformation<ComplexNestedClass> ti = TypeExtractor.getForClass(ComplexNestedClass.class);

	String[][] tests = new String[][] {
		new String[] {"nonexistent"},
		new String[] {"date.abc"} // nesting into unnested
	};
	for (String[] test : tests) {
		Throwable e = null;
		try {
			new ExpressionKeys<>(test, ti);
		} catch (Throwable t) {
			e = t;
		}
		Assert.assertNotNull(e);
	}
}
 
Example #3
Source File: ExpressionKeysTest.java    From flink with Apache License 2.0 6 votes vote down vote up
@Test
public void testInvalidPojo() throws Throwable {
	TypeInformation<ComplexNestedClass> ti = TypeExtractor.getForClass(ComplexNestedClass.class);

	String[][] tests = new String[][] {
		new String[] {"nonexistent"},
		new String[] {"date.abc"} // nesting into unnested
	};
	for (String[] test : tests) {
		Throwable e = null;
		try {
			new ExpressionKeys<>(test, ti);
		} catch (Throwable t) {
			e = t;
		}
		Assert.assertNotNull(e);
	}
}