use of org.junit.experimental.theories.DataPoints in project RoboBinding by RoboBinding.
the class ElementWrapperTest method unsupportedElements.
@DataPoints("unsupportedElements")
public static Element[] unsupportedElements() {
Elements elements = compilation.getElements();
PackageElement packageElement = elements.getPackageElement("java.lang");
TypeElement typeElement = elements.getTypeElement(MethodsAndFields.class.getName());
VariableElement variableElement = ElementFilter.fieldsIn(typeElement.getEnclosedElements()).get(0);
return new Element[] { packageElement, variableElement };
}
use of org.junit.experimental.theories.DataPoints in project RoboBinding by RoboBinding.
the class ElementWrapperTest method supportedElements.
@DataPoints("supportedElements")
public static ElementToWrapped[] supportedElements() {
Elements elements = compilation.getElements();
TypeElement typeElement = elements.getTypeElement(MethodsAndFields.class.getName());
ExecutableElement methodElement = ElementFilter.methodsIn(typeElement.getEnclosedElements()).get(0);
return new ElementToWrapped[] { a(typeElement).itsWrapped(WrappedTypeElement.class), a(methodElement).itsWrapped(MethodElement.class) };
}
use of org.junit.experimental.theories.DataPoints in project RoboBinding by RoboBinding.
the class TypeMirrorWrapperTest method unsupportedTypeMirrors.
@DataPoints("unsupportedTypeMirrors")
public static TypeMirror[] unsupportedTypeMirrors() {
Types types = compilation.getTypes();
NullType nullType = types.getNullType();
NoType noneType = types.getNoType(TypeKind.NONE);
return new TypeMirror[] { nullType, noneType };
}
use of org.junit.experimental.theories.DataPoints in project netty by netty.
the class AbstractDecoderTest method smallData.
@DataPoints("smallData")
public static ByteBuf[] smallData() {
ByteBuf heap = Unpooled.wrappedBuffer(compressedBytesSmall);
ByteBuf direct = Unpooled.directBuffer(compressedBytesSmall.length);
direct.writeBytes(compressedBytesSmall);
return new ByteBuf[] { heap, direct };
}
use of org.junit.experimental.theories.DataPoints in project netty by netty.
the class AbstractEncoderTest method largeData.
@DataPoints("largeData")
public static ByteBuf[] largeData() {
ByteBuf heap = Unpooled.wrappedBuffer(BYTES_LARGE);
ByteBuf direct = Unpooled.directBuffer(BYTES_LARGE.length);
direct.writeBytes(BYTES_LARGE);
return new ByteBuf[] { heap, direct };
}
Aggregations