Skip to content

Commit

Permalink
Trying to fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
mtedone committed Jul 5, 2015
1 parent 9b94467 commit dcca7f5
Showing 1 changed file with 23 additions and 22 deletions.
Expand Up @@ -17,6 +17,11 @@
import uk.co.jemos.podam.test.enums.ExternalRatePodamEnum;
import uk.co.jemos.podam.test.unit.AbstractPodamSteps;
import uk.co.jemos.podam.typeManufacturers.TypeManufacturerParamsWrapper;
import uk.co.jemos.podam.typeManufacturers.TypeManufacturerParamsWrapperForGenericTypes;

import java.lang.reflect.Type;
import java.util.HashMap;
import java.util.Map;

/**
* Created by tedonema on 28/06/2015.
Expand Down Expand Up @@ -741,28 +746,24 @@ public void podamMessagingSystemShouldReturnAGenericTypeValue() throws Exception
(ClassGenericConstructorPojo.class);
podamValidationSteps.theObjectShouldNotBeNull(attributeMetadata);

// Map<String, Type> genericTypeArgumentsMap = new HashMap<String, Type>();
// Type[] attrGenericArgsExtra = TypeManufacturerUtil.fillTypeArgMap(genericTypeArgumentsMap,
// ClassGenericConstructorPojo.class, new Type[] {String.class});
// for (int i = 0; i < attrGenericArgsExtra.length; i++) {
// Type attrGenericArg = attrGenericArgsExtra[i];
// genericTypeArgumentsMap.put(attrGenericArg.getTypeName(), attrGenericArg);
// }
//
// TypeManufacturerParamsWrapperForGenericTypes paramsWrapper =
// new TypeManufacturerParamsWrapperForGenericTypes(dataProviderStrategy, attributeMetadata,
// genericTypeArgumentsMap, String.class);
//
// Message<? extends Object> message = podamFactorySteps.givenATypeManufacturingMessageWithStringQualifier(
// paramsWrapper, PodamConstants.HEADER_NAME, PodamConstants.GENERIC_TYPE_QUALIFIER);
// podamValidationSteps.theObjectShouldNotBeNull(message);
//
// Message value = podamInvocationSteps.whenISendAMessageToTheChannel(inputChannel, message);
// podamValidationSteps.theObjectShouldNotBeNull(value);
//
// Object payload = value.getPayload();
// podamValidationSteps.theObjectShouldNotBeNull(payload);
// podamValidationSteps.theTwoObjectsShouldBeEqual(String.class, payload);
Map<String, Type> genericTypeArgumentsMap = new HashMap<String, Type>();

genericTypeArgumentsMap.put("T", String.class);

TypeManufacturerParamsWrapperForGenericTypes paramsWrapper =
new TypeManufacturerParamsWrapperForGenericTypes(dataProviderStrategy, attributeMetadata,
genericTypeArgumentsMap, String.class);

Message<? extends Object> message = podamFactorySteps.givenATypeManufacturingMessageWithStringQualifier(
paramsWrapper, PodamConstants.HEADER_NAME, PodamConstants.GENERIC_TYPE_QUALIFIER);
podamValidationSteps.theObjectShouldNotBeNull(message);

Message value = podamInvocationSteps.whenISendAMessageToTheChannel(inputChannel, message);
podamValidationSteps.theObjectShouldNotBeNull(value);

Object payload = value.getPayload();
podamValidationSteps.theObjectShouldNotBeNull(payload);
podamValidationSteps.theTwoObjectsShouldBeEqual(String.class, payload);

} finally {

Expand Down

0 comments on commit dcca7f5

Please sign in to comment.