Java 类java.lang.Double 实例源码

项目:FreeYourCode    文件:GeneratedByAgentTestMockPluginWithFullInjectionTest.java   
@Test
public void testmyMethod2ParamNoResult_12() throws Exception {
    //Mock the stub methods
    Object[] myMethod2ParamNoResult_enter_0 = new Object[]{JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":8.0}"), JsonSerialisationUtils.deserialize("{\"@type\":\"com.freeyourcode.testgenerator.test.TestedBean\"}")};
    Object[] myMethod2ParamNoResult_diffsOnExit_1 = new Object[]{null, null};
    Mockito.doAnswer(exitAnswer(myMethod2ParamNoResult_diffsOnExit_1)).when(testedClassStub).myMethod2ParamNoResult(argEq((Double)myMethod2ParamNoResult_enter_0[0]), argEq((TestedBean)myMethod2ParamNoResult_enter_0[1]));

    //Call to tested method
    Object[] inputParams_enter = new Object[]{JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":8.0}"), JsonSerialisationUtils.deserialize("{\"@type\":\"com.freeyourcode.testgenerator.test.TestedBean\"}")};
    Object[] inputParams_exit = new Object[]{JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":8.0}"), JsonSerialisationUtils.deserialize("{\"@type\":\"com.freeyourcode.testgenerator.test.TestedBean\"}")};
    classCallingTestedClassWithFieldIni.myMethod2ParamNoResult((Double)inputParams_enter[0], (TestedBean)inputParams_enter[1]);
    assertEquals(inputParams_exit, inputParams_enter);

    //Check the number of calls to stub methods
    Mockito.verify(testedClassStub, Mockito.times(1)).myMethod2ParamNoResult((Double)Mockito.any(), (TestedBean)Mockito.any());
}
项目:FreeYourCode    文件:GeneratedByAgentTestMockPluginWithFullInjectionTest.java   
@Test
public void testmyMethod2ParamNoResult_13() throws Exception {
    //Mock the stub methods
    Object[] myMethod2ParamNoResult_enter_0 = new Object[]{JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":8.0}"), JsonSerialisationUtils.deserialize("{\"@type\":\"com.freeyourcode.testgenerator.test.TestedBean\"}")};
    Object[] myMethod2ParamNoResult_diffsOnExit_1 = new Object[]{null, null};
    Mockito.doAnswer(exitAnswer(myMethod2ParamNoResult_diffsOnExit_1)).when(testedClassStub).myMethod2ParamNoResult(argEq((Double)myMethod2ParamNoResult_enter_0[0]), argEq((TestedBean)myMethod2ParamNoResult_enter_0[1]));

    //Call to tested method
    Object[] inputParams_enter = new Object[]{JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":8.0}"), JsonSerialisationUtils.deserialize("{\"@type\":\"com.freeyourcode.testgenerator.test.TestedBean\"}")};
    Object[] inputParams_exit = new Object[]{JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":8.0}"), JsonSerialisationUtils.deserialize("{\"@type\":\"com.freeyourcode.testgenerator.test.TestedBean\"}")};
    classCallingTestedClassWithFieldIni.myMethod2ParamNoResult((Double)inputParams_enter[0], (TestedBean)inputParams_enter[1]);
    assertEquals(inputParams_exit, inputParams_enter);

    //Check the number of calls to stub methods
    Mockito.verify(testedClassStub, Mockito.times(1)).myMethod2ParamNoResult((Double)Mockito.any(), (TestedBean)Mockito.any());
}
项目:FreeYourCode    文件:GeneratedByAgentTestMockPluginSoftMatcherModeTest.java   
@Test
public void testgetModifiedValue2FromMyMethodIsModifyingInput_18() throws Exception {
    //Mock the stub methods
    Object[] myMethodIsModifyingInput_diffsOnExit_0 = new Object[]{null, JsonSerialisationUtils.deserialize("{\"@type\":\"java.util.HashMap\",\"libelle\":\"NewLibelle\",\"subBean.value2\":\"NewValueOnSubBean\"}")};
    Object response0 = JsonSerialisationUtils.deserialize("{\"@type\":\"com.freeyourcode.test.utils.InputPointerResolver\",\"pathToInput\":\"1.subBean.value2\"}");
    Mockito.when(testedClassStub.myMethodIsModifyingInput(Mockito.anyDouble(), (TestedBean)Mockito.any())).then(exitAnswer(myMethodIsModifyingInput_diffsOnExit_0, response0));

    //Call to tested method
    Object[] inputParams_enter = new Object[]{JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":8.0}"), JsonSerialisationUtils.deserialize("{\"@type\":\"com.freeyourcode.testgenerator.test.TestedBean\",\"libelle\":\"l1\",\"value\":1,\"valueObject\":2,\"subBean\":{\"value2\":\"v2\"}}")};
    Object[] inputParams_exit = new Object[]{JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":8.0}"), JsonSerialisationUtils.deserialize("{\"@type\":\"com.freeyourcode.testgenerator.test.TestedBean\",\"libelle\":\"NewLibelle\",\"value\":1,\"valueObject\":2,\"subBean\":{\"value2\":\"NewValueOnSubBean\"}}")};
    Object testedMethodResult = classCallingTestedClassWithFieldInjection.getModifiedValue2FromMyMethodIsModifyingInput((Double)inputParams_enter[0], (TestedBean)inputParams_enter[1]);
    assertEquals(JsonSerialisationUtils.deserialize("\"NewValueOnSubBean\""), testedMethodResult);
    assertEquals(inputParams_exit, inputParams_enter);

    //Check the number of calls to stub methods
    Mockito.verify(testedClassStub, Mockito.times(1)).myMethodIsModifyingInput(Mockito.anyDouble(), (TestedBean)Mockito.any());
}
项目:FreeYourCode    文件:GeneratedByAgentTestClassCallingGenericClassImpl.java   
@Test
public void testabstractCompute_0() throws Exception {
    //Mock the stub methods
    Object[] abstractCompute_enter_0 = new Object[]{JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":7.0}")};
    Object[] abstractCompute_diffsOnExit_1 = new Object[]{null};
    Mockito.doAnswer(exitAnswer(abstractCompute_diffsOnExit_1)).when(genericClassImplStub).abstractCompute(argEq((Double)abstractCompute_enter_0[0]));

    //Call to tested method
    Object[] inputParams_enter = new Object[]{JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":7.0}")};
    Object[] inputParams_exit = new Object[]{JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":7.0}")};
    classCallingGenericClassImpl.abstractCompute((Double)inputParams_enter[0]);
    assertEquals(inputParams_exit, inputParams_enter);

    //Check the number of calls to stub methods
    Mockito.verify(genericClassImplStub, Mockito.times(1)).abstractCompute((Double)Mockito.any());
}
项目:FreeYourCode    文件:GeneratedByAgentTestSpyPluginTest.java   
@Test
public void testmyMethod2ParamPrimitifResultPrimitif_0() throws Exception {
    //Mock the stub methods
    Object[] myMethod2ParamPrimitifResultPrimitif_enter_0 = new Object[]{JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":45.2}"), JsonSerialisationUtils.deserialize("{\"@type\":\"com.freeyourcode.testgenerator.test.TestedBean\",\"libelle\":\"coucou\",\"value\":7,\"valueObject\":8,\"subBean\":{\"value2\":\"test\"}}")};
    Object[] myMethod2ParamPrimitifResultPrimitif_diffsOnExit_1 = new Object[]{null, null};
    Object response0 = JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":90.4}");
    Mockito.when(testedClassStub.myMethod2ParamPrimitifResultPrimitif(argEq((Double)myMethod2ParamPrimitifResultPrimitif_enter_0[0]), argEq((TestedBean)myMethod2ParamPrimitifResultPrimitif_enter_0[1]))).then(exitAnswer(myMethod2ParamPrimitifResultPrimitif_diffsOnExit_1, response0));

    //Call to tested method
    Object[] inputParams_enter = new Object[]{JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":45.2}"), JsonSerialisationUtils.deserialize("{\"@type\":\"com.freeyourcode.testgenerator.test.TestedBean\",\"libelle\":\"coucou\",\"value\":7,\"valueObject\":8,\"subBean\":{\"value2\":\"test\"}}")};
    Object[] inputParams_exit = new Object[]{JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":45.2}"), JsonSerialisationUtils.deserialize("{\"@type\":\"com.freeyourcode.testgenerator.test.TestedBean\",\"libelle\":\"coucou\",\"value\":7,\"valueObject\":8,\"subBean\":{\"value2\":\"test\"}}")};
    Object testedMethodResult = classCallingClassCallingTestedClassWithFieldInjection.myMethod2ParamPrimitifResultPrimitif((Double)inputParams_enter[0], (TestedBean)inputParams_enter[1]);
    assertEquals(JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":90.4}"), testedMethodResult);
    assertEquals(inputParams_exit, inputParams_enter);

    //Check the number of calls to stub methods
    Mockito.verify(testedClassStub, Mockito.times(1)).myMethod2ParamPrimitifResultPrimitif(Mockito.anyDouble(), (TestedBean)Mockito.any());
}
项目:FreeYourCode    文件:GeneratedByAgentTestMockPluginMediumMatcherModeTest.java   
@Test
public void testmyMethod2ParamResult_17() throws Exception {
    //Mock the stub methods
    Object[] myMethod2ParamResult_enter_0 = new Object[]{JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":45.2}"), JsonSerialisationUtils.deserialize("{\"@type\":\"com.freeyourcode.testgenerator.test.TestedBean\",\"libelle\":\"coucou\",\"value\":7,\"valueObject\":8}")};
    Object[] myMethod2ParamResult_diffsOnExit_1 = new Object[]{null, null};
    Object response0 = JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":90.4}");
    Mockito.when(testedClassStub.myMethod2ParamResult(argEq((Double)myMethod2ParamResult_enter_0[0]), argEq((TestedBean)myMethod2ParamResult_enter_0[1]))).then(exitAnswer(myMethod2ParamResult_diffsOnExit_1, response0));

    //Call to tested method
    Object[] inputParams_enter = new Object[]{JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":45.2}"), JsonSerialisationUtils.deserialize("{\"@type\":\"com.freeyourcode.testgenerator.test.TestedBean\",\"libelle\":\"coucou\",\"value\":7,\"valueObject\":8}")};
    Object[] inputParams_exit = new Object[]{JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":45.2}"), JsonSerialisationUtils.deserialize("{\"@type\":\"com.freeyourcode.testgenerator.test.TestedBean\",\"libelle\":\"coucou\",\"value\":7,\"valueObject\":8}")};
    Object testedMethodResult = classCallingTestedClassWithFieldInjection.myMethod2ParamResult((Double)inputParams_enter[0], (TestedBean)inputParams_enter[1]);
    assertEquals(JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":90.4}"), testedMethodResult);
    assertEquals(inputParams_exit, inputParams_enter);

    //Check the number of calls to stub methods
    Mockito.verify(testedClassStub, Mockito.times(1)).myMethod2ParamResult((Double)Mockito.any(), (TestedBean)Mockito.any());
}
项目:xDrip    文件:BgReadingMessage.java   
public BgReadingMessage(Long timestamp, Double time_since_sensor_started, Double raw_data, Double filtered_data, Double age_adjusted_raw_value, Boolean calibration_flag, Double calculated_value, Double filtered_calculated_value, Double calculated_value_slope, Double a, Double b, Double c, Double ra, Double rb, Double rc, String uuid, String calibration_uuid, String sensor_uuid, Boolean ignoreforstats, Double raw_calculated, Boolean hide_slope, String noise, ByteString unknownFields) {
  super(ADAPTER, unknownFields);
  this.timestamp = timestamp;
  this.time_since_sensor_started = time_since_sensor_started;
  this.raw_data = raw_data;
  this.filtered_data = filtered_data;
  this.age_adjusted_raw_value = age_adjusted_raw_value;
  this.calibration_flag = calibration_flag;
  this.calculated_value = calculated_value;
  this.filtered_calculated_value = filtered_calculated_value;
  this.calculated_value_slope = calculated_value_slope;
  this.a = a;
  this.b = b;
  this.c = c;
  this.ra = ra;
  this.rb = rb;
  this.rc = rc;
  this.uuid = uuid;
  this.calibration_uuid = calibration_uuid;
  this.sensor_uuid = sensor_uuid;
  this.ignoreforstats = ignoreforstats;
  this.raw_calculated = raw_calculated;
  this.hide_slope = hide_slope;
  this.noise = noise;
}
项目:xDrip-plus    文件:BgReadingMessage.java   
public BgReadingMessage(Long timestamp, Double time_since_sensor_started, Double raw_data, Double filtered_data, Double age_adjusted_raw_value, Boolean calibration_flag, Double calculated_value, Double filtered_calculated_value, Double calculated_value_slope, Double a, Double b, Double c, Double ra, Double rb, Double rc, String uuid, String calibration_uuid, String sensor_uuid, Boolean ignoreforstats, Double raw_calculated, Boolean hide_slope, String noise, ByteString unknownFields) {
  super(ADAPTER, unknownFields);
  this.timestamp = timestamp;
  this.time_since_sensor_started = time_since_sensor_started;
  this.raw_data = raw_data;
  this.filtered_data = filtered_data;
  this.age_adjusted_raw_value = age_adjusted_raw_value;
  this.calibration_flag = calibration_flag;
  this.calculated_value = calculated_value;
  this.filtered_calculated_value = filtered_calculated_value;
  this.calculated_value_slope = calculated_value_slope;
  this.a = a;
  this.b = b;
  this.c = c;
  this.ra = ra;
  this.rb = rb;
  this.rc = rc;
  this.uuid = uuid;
  this.calibration_uuid = calibration_uuid;
  this.sensor_uuid = sensor_uuid;
  this.ignoreforstats = ignoreforstats;
  this.raw_calculated = raw_calculated;
  this.hide_slope = hide_slope;
  this.noise = noise;
}
项目:FreeYourCode    文件:GeneratedByAgentTestMockPluginMediumMatcherModeTest.java   
@Test
public void testmyMethod2ParamNoResult_10() throws Exception {
    //Mock the stub methods
    Object[] myMethod2ParamNoResult_enter_0 = new Object[]{JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":8.0}"), JsonSerialisationUtils.deserialize("{\"@type\":\"com.freeyourcode.testgenerator.test.TestedBean\",\"libelle\":\"lib\",\"value\":1,\"valueObject\":2}")};
    Object[] myMethod2ParamNoResult_diffsOnExit_1 = new Object[]{null, null};
    Mockito.doAnswer(exitAnswer(myMethod2ParamNoResult_diffsOnExit_1)).when(testedClassStub).myMethod2ParamNoResult(argEq((Double)myMethod2ParamNoResult_enter_0[0]), argEq((TestedBean)myMethod2ParamNoResult_enter_0[1]));

    //Call to tested method
    Object[] inputParams_enter = new Object[]{JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":8.0}"), JsonSerialisationUtils.deserialize("{\"@type\":\"com.freeyourcode.testgenerator.test.TestedBean\",\"libelle\":\"lib\",\"value\":1,\"valueObject\":2}")};
    Object[] inputParams_exit = new Object[]{JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":8.0}"), JsonSerialisationUtils.deserialize("{\"@type\":\"com.freeyourcode.testgenerator.test.TestedBean\",\"libelle\":\"lib\",\"value\":1,\"valueObject\":2}")};
    classCallingTestedClassWithFieldInjection.myMethod2ParamNoResult((Double)inputParams_enter[0], (TestedBean)inputParams_enter[1]);
    assertEquals(inputParams_exit, inputParams_enter);

    //Check the number of calls to stub methods
    Mockito.verify(testedClassStub, Mockito.times(1)).myMethod2ParamNoResult((Double)Mockito.any(), (TestedBean)Mockito.any());
}
项目:FreeYourCode    文件:GeneratedByAgentTestMockPluginWithNewInstance.java   
@Test
public void testmyMethod2ParamPrimitifResultPrimitif_0() throws Exception {
    //Mock the stub methods
    Object[] myMethod2ParamPrimitifResultPrimitif_enter_0 = new Object[]{JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":45.2}"), JsonSerialisationUtils.deserialize("{\"@type\":\"com.freeyourcode.testgenerator.test.TestedBean\",\"libelle\":\"coucou\",\"value\":7,\"valueObject\":8,\"subBean\":{\"value2\":\"test\"}}")};
    Object[] myMethod2ParamPrimitifResultPrimitif_diffsOnExit_1 = new Object[]{null, null};
    Object response0 = JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":90.4}");
    Mockito.when(testedClassStub.myMethod2ParamPrimitifResultPrimitif(argEq((Double)myMethod2ParamPrimitifResultPrimitif_enter_0[0]), argEq((TestedBean)myMethod2ParamPrimitifResultPrimitif_enter_0[1]))).then(exitAnswer(myMethod2ParamPrimitifResultPrimitif_diffsOnExit_1, response0));

    //Call to tested method
    Object[] inputParams_enter = new Object[]{JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":45.2}"), JsonSerialisationUtils.deserialize("{\"@type\":\"com.freeyourcode.testgenerator.test.TestedBean\",\"libelle\":\"coucou\",\"value\":7,\"valueObject\":8,\"subBean\":{\"value2\":\"test\"}}")};
    Object[] inputParams_exit = new Object[]{JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":45.2}"), JsonSerialisationUtils.deserialize("{\"@type\":\"com.freeyourcode.testgenerator.test.TestedBean\",\"libelle\":\"coucou\",\"value\":7,\"valueObject\":8,\"subBean\":{\"value2\":\"test\"}}")};
    Object testedMethodResult = classCallingTestedClassWithNewInstance.myMethod2ParamPrimitifResultPrimitif((Double)inputParams_enter[0], (TestedBean)inputParams_enter[1]);
    assertEquals(JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":90.4}"), testedMethodResult);
    assertEquals(inputParams_exit, inputParams_enter);

    //Check the number of calls to stub methods
    Mockito.verify(testedClassStub, Mockito.times(1)).myMethod2ParamPrimitifResultPrimitif(Mockito.anyDouble(), (TestedBean)Mockito.any());
}
项目:FreeYourCode    文件:GeneratedByAgentTestMockPluginWithNewInstance.java   
@Test
public void testmyMethod2ParamNoResult_9() throws Exception {
    //Mock the stub methods
    Object[] myMethod2ParamNoResult_enter_0 = new Object[]{JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":8.0}"), JsonSerialisationUtils.deserialize("{\"@type\":\"com.freeyourcode.testgenerator.test.TestedBean\",\"libelle\":\"lib\",\"value\":1,\"valueObject\":2}")};
    Object[] myMethod2ParamNoResult_diffsOnExit_1 = new Object[]{null, null};
    Mockito.doAnswer(exitAnswer(myMethod2ParamNoResult_diffsOnExit_1)).when(testedClassStub).myMethod2ParamNoResult(argEq((Double)myMethod2ParamNoResult_enter_0[0]), argEq((TestedBean)myMethod2ParamNoResult_enter_0[1]));

    //Call to tested method
    Object[] inputParams_enter = new Object[]{JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":8.0}"), JsonSerialisationUtils.deserialize("{\"@type\":\"com.freeyourcode.testgenerator.test.TestedBean\",\"libelle\":\"lib\",\"value\":1,\"valueObject\":2}")};
    Object[] inputParams_exit = new Object[]{JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":8.0}"), JsonSerialisationUtils.deserialize("{\"@type\":\"com.freeyourcode.testgenerator.test.TestedBean\",\"libelle\":\"lib\",\"value\":1,\"valueObject\":2}")};
    classCallingTestedClassWithNewInstance.myMethod2ParamNoResult((Double)inputParams_enter[0], (TestedBean)inputParams_enter[1]);
    assertEquals(inputParams_exit, inputParams_enter);

    //Check the number of calls to stub methods
    Mockito.verify(testedClassStub, Mockito.times(1)).myMethod2ParamNoResult((Double)Mockito.any(), (TestedBean)Mockito.any());
}
项目:FreeYourCode    文件:GeneratedByAgentTestMockPluginWithNewInstance.java   
@Test
public void testmyMethod2ParamPrimitifResultPrimitif_1() throws Exception {
    //Mock the stub methods
    Object[] myMethod2ParamPrimitifResultPrimitif_enter_0 = new Object[]{JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":45.2}"), JsonSerialisationUtils.deserialize("{\"@type\":\"com.freeyourcode.testgenerator.test.TestedBean\",\"libelle\":\"coucou\",\"value\":7,\"valueObject\":8}")};
    Object[] myMethod2ParamPrimitifResultPrimitif_diffsOnExit_1 = new Object[]{null, null};
    Object response0 = JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":90.4}");
    Mockito.when(testedClassStub.myMethod2ParamPrimitifResultPrimitif(argEq((Double)myMethod2ParamPrimitifResultPrimitif_enter_0[0]), argEq((TestedBean)myMethod2ParamPrimitifResultPrimitif_enter_0[1]))).then(exitAnswer(myMethod2ParamPrimitifResultPrimitif_diffsOnExit_1, response0));

    //Call to tested method
    Object[] inputParams_enter = new Object[]{JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":45.2}"), JsonSerialisationUtils.deserialize("{\"@type\":\"com.freeyourcode.testgenerator.test.TestedBean\",\"libelle\":\"coucou\",\"value\":7,\"valueObject\":8}")};
    Object[] inputParams_exit = new Object[]{JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":45.2}"), JsonSerialisationUtils.deserialize("{\"@type\":\"com.freeyourcode.testgenerator.test.TestedBean\",\"libelle\":\"coucou\",\"value\":7,\"valueObject\":8}")};
    Object testedMethodResult = classCallingTestedClassWithNewInstance.myMethod2ParamPrimitifResultPrimitif((Double)inputParams_enter[0], (TestedBean)inputParams_enter[1]);
    assertEquals(JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":90.4}"), testedMethodResult);
    assertEquals(inputParams_exit, inputParams_enter);

    //Check the number of calls to stub methods
    Mockito.verify(testedClassStub, Mockito.times(1)).myMethod2ParamPrimitifResultPrimitif(Mockito.anyDouble(), (TestedBean)Mockito.any());
}
项目:FreeYourCode    文件:GeneratedByAgentTestSpyPluginTest.java   
@Test
public void testmyMethod2ParamPrimitifResultPrimitif_15() throws Exception {
    //Mock the stub methods
    Object[] myMethod2ParamPrimitifResultPrimitif_enter_0 = new Object[]{JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":45.2}"), JsonSerialisationUtils.deserialize("{\"@type\":\"com.freeyourcode.testgenerator.test.TestedBean\",\"libelle\":\"coucou\",\"value\":7,\"valueObject\":8,\"subBean\":{\"value2\":\"test\"}}")};
    Object[] myMethod2ParamPrimitifResultPrimitif_diffsOnExit_1 = new Object[]{null, null};
    Object response0 = JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":90.4}");
    Mockito.when(testedClassStub.myMethod2ParamPrimitifResultPrimitif(argEq((Double)myMethod2ParamPrimitifResultPrimitif_enter_0[0]), argEq((TestedBean)myMethod2ParamPrimitifResultPrimitif_enter_0[1]))).then(exitAnswer(myMethod2ParamPrimitifResultPrimitif_diffsOnExit_1, response0));

    //Call to tested method
    Object[] inputParams_enter = new Object[]{JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":45.2}"), JsonSerialisationUtils.deserialize("{\"@type\":\"com.freeyourcode.testgenerator.test.TestedBean\",\"libelle\":\"coucou\",\"value\":7,\"valueObject\":8,\"subBean\":{\"value2\":\"test\"}}")};
    Object[] inputParams_exit = new Object[]{JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":45.2}"), JsonSerialisationUtils.deserialize("{\"@type\":\"com.freeyourcode.testgenerator.test.TestedBean\",\"libelle\":\"coucou\",\"value\":7,\"valueObject\":8,\"subBean\":{\"value2\":\"test\"}}")};
    Object testedMethodResult = classCallingClassCallingTestedClassWithFieldInjection.myMethod2ParamPrimitifResultPrimitif((Double)inputParams_enter[0], (TestedBean)inputParams_enter[1]);
    assertEquals(JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":90.4}"), testedMethodResult);
    assertEquals(inputParams_exit, inputParams_enter);

    //Check the number of calls to stub methods
    Mockito.verify(testedClassStub, Mockito.times(1)).myMethod2ParamPrimitifResultPrimitif(Mockito.anyDouble(), (TestedBean)Mockito.any());
}
项目:FreeYourCode    文件:GeneratedByAgentTestMockPluginWithFullInjectionTest.java   
@Test
public void testmyMethod2ParamPrimitifResultPrimitif_14() throws Exception {
    //Mock the stub methods
    Object[] myMethod2ParamPrimitifResultPrimitif_enter_0 = new Object[]{JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":45.2}"), JsonSerialisationUtils.deserialize("{\"@type\":\"com.freeyourcode.testgenerator.test.TestedBean\",\"libelle\":\"coucou\",\"value\":7,\"valueObject\":8}")};
    Object[] myMethod2ParamPrimitifResultPrimitif_diffsOnExit_1 = new Object[]{null, null};
    Object response0 = JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":90.4}");
    Mockito.when(testedClassStub.myMethod2ParamPrimitifResultPrimitif(argEq((Double)myMethod2ParamPrimitifResultPrimitif_enter_0[0]), argEq((TestedBean)myMethod2ParamPrimitifResultPrimitif_enter_0[1]))).then(exitAnswer(myMethod2ParamPrimitifResultPrimitif_diffsOnExit_1, response0));

    //Call to tested method
    Object[] inputParams_enter = new Object[]{JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":45.2}"), JsonSerialisationUtils.deserialize("{\"@type\":\"com.freeyourcode.testgenerator.test.TestedBean\",\"libelle\":\"coucou\",\"value\":7,\"valueObject\":8}")};
    Object[] inputParams_exit = new Object[]{JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":45.2}"), JsonSerialisationUtils.deserialize("{\"@type\":\"com.freeyourcode.testgenerator.test.TestedBean\",\"libelle\":\"coucou\",\"value\":7,\"valueObject\":8}")};
    Object testedMethodResult = classCallingTestedClassWithFieldIni.myMethod2ParamPrimitifResultPrimitif((Double)inputParams_enter[0], (TestedBean)inputParams_enter[1]);
    assertEquals(JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":90.4}"), testedMethodResult);
    assertEquals(inputParams_exit, inputParams_enter);

    //Check the number of calls to stub methods
    Mockito.verify(testedClassStub, Mockito.times(1)).myMethod2ParamPrimitifResultPrimitif(Mockito.anyDouble(), (TestedBean)Mockito.any());
}
项目:FreeYourCode    文件:GeneratedByAgentTestMockPluginWithNewInstance.java   
@Test
public void testmyMethod1ParamPrimitifResultPrimitif_5() throws Exception {
    //Mock the stub methods
    Object[] myMethod1ParamPrimitifResultPrimitif_enter_0 = new Object[]{JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":4.0003}")};
    Object[] myMethod1ParamPrimitifResultPrimitif_diffsOnExit_1 = new Object[]{null};
    Object response0 = JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":8.0006}");
    Mockito.when(testedClassStub.myMethod1ParamPrimitifResultPrimitif(argEq((Double)myMethod1ParamPrimitifResultPrimitif_enter_0[0]))).then(exitAnswer(myMethod1ParamPrimitifResultPrimitif_diffsOnExit_1, response0));

    //Call to tested method
    Object[] inputParams_enter = new Object[]{JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":4.0003}")};
    Object[] inputParams_exit = new Object[]{JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":4.0003}")};
    Object testedMethodResult = classCallingTestedClassWithNewInstance.myMethod1ParamPrimitifResultPrimitif((Double)inputParams_enter[0]);
    assertEquals(JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":8.0006}"), testedMethodResult);
    assertEquals(inputParams_exit, inputParams_enter);

    //Check the number of calls to stub methods
    Mockito.verify(testedClassStub, Mockito.times(1)).myMethod1ParamPrimitifResultPrimitif(Mockito.anyDouble());
}
项目:FreeYourCode    文件:GeneratedByAgentTestMockPluginSoftMatcherModeTest.java   
@Test
public void testmyMethod1ParamPrimitifResultPrimitif_7() throws Exception {
    //Mock the stub methods
    Object[] myMethod1ParamPrimitifResultPrimitif_diffsOnExit_0 = new Object[]{null};
    Object response0 = JsonSerialisationUtils.deserialize("{\"@type\":\"double\"}");
    Mockito.when(testedClassStub.myMethod1ParamPrimitifResultPrimitif(Mockito.anyDouble())).then(exitAnswer(myMethod1ParamPrimitifResultPrimitif_diffsOnExit_0, response0));

    //Call to tested method
    Object[] inputParams_enter = new Object[]{JsonSerialisationUtils.deserialize("{\"@type\":\"double\"}")};
    Object[] inputParams_exit = new Object[]{JsonSerialisationUtils.deserialize("{\"@type\":\"double\"}")};
    Object testedMethodResult = classCallingTestedClassWithFieldInjection.myMethod1ParamPrimitifResultPrimitif((Double)inputParams_enter[0]);
    assertEquals(JsonSerialisationUtils.deserialize("{\"@type\":\"double\"}"), testedMethodResult);
    assertEquals(inputParams_exit, inputParams_enter);

    //Check the number of calls to stub methods
    Mockito.verify(testedClassStub, Mockito.times(1)).myMethod1ParamPrimitifResultPrimitif(Mockito.anyDouble());
}
项目:FreeYourCode    文件:GeneratedByAgentTestMockPluginMediumMatcherModeTest.java   
@Test
public void testmyMethod2ParamNoResult_11() throws Exception {
    //Mock the stub methods
    Object[] myMethod2ParamNoResult_enter_0 = new Object[]{JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":8.0}"), null};
    Object[] myMethod2ParamNoResult_diffsOnExit_1 = new Object[]{null, null};
    Mockito.doAnswer(exitAnswer(myMethod2ParamNoResult_diffsOnExit_1)).when(testedClassStub).myMethod2ParamNoResult(argEq((Double)myMethod2ParamNoResult_enter_0[0]), argEq((TestedBean)myMethod2ParamNoResult_enter_0[1]));

    //Call to tested method
    Object[] inputParams_enter = new Object[]{JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":8.0}"), null};
    Object[] inputParams_exit = new Object[]{JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":8.0}"), null};
    classCallingTestedClassWithFieldInjection.myMethod2ParamNoResult((Double)inputParams_enter[0], (TestedBean)inputParams_enter[1]);
    assertEquals(inputParams_exit, inputParams_enter);

    //Check the number of calls to stub methods
    Mockito.verify(testedClassStub, Mockito.times(1)).myMethod2ParamNoResult((Double)Mockito.any(), (TestedBean)Mockito.any());
}
项目:FreeYourCode    文件:GeneratedByAgentTestMockPluginMediumMatcherModeTest.java   
@Test
public void testmyMethod1ParamPrimitifResultPrimitif_6() throws Exception {
    //Mock the stub methods
    Object[] myMethod1ParamPrimitifResultPrimitif_enter_0 = new Object[]{JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":4.0003}")};
    Object[] myMethod1ParamPrimitifResultPrimitif_diffsOnExit_1 = new Object[]{null};
    Object response0 = JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":8.0006}");
    Mockito.when(testedClassStub.myMethod1ParamPrimitifResultPrimitif(argEq((Double)myMethod1ParamPrimitifResultPrimitif_enter_0[0]))).then(exitAnswer(myMethod1ParamPrimitifResultPrimitif_diffsOnExit_1, response0));

    //Call to tested method
    Object[] inputParams_enter = new Object[]{JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":4.0003}")};
    Object[] inputParams_exit = new Object[]{JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":4.0003}")};
    Object testedMethodResult = classCallingTestedClassWithFieldInjection.myMethod1ParamPrimitifResultPrimitif((Double)inputParams_enter[0]);
    assertEquals(JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":8.0006}"), testedMethodResult);
    assertEquals(inputParams_exit, inputParams_enter);

    //Check the number of calls to stub methods
    Mockito.verify(testedClassStub, Mockito.times(1)).myMethod1ParamPrimitifResultPrimitif(Mockito.anyDouble());
}
项目:FreeYourCode    文件:GeneratedByAgentTestMockPluginMediumMatcherModeTest.java   
@Test
public void testmyStaticMethod_0() throws Exception {
    //Mock the stub methods
    PowerMockito.mockStatic(TestedClass.class);
    Object[] myStaticMethod_enter_0 = new Object[]{JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":45.2}")};
    Object[] myStaticMethod_diffsOnExit_1 = new Object[]{null};
    Object response0 = JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":135.60000000000002}");
    Mockito.when(TestedClass.myStaticMethod(argEq((Double)myStaticMethod_enter_0[0]))).then(exitAnswer(myStaticMethod_diffsOnExit_1, response0));

    //Call to tested method
    Object[] inputParams_enter = new Object[]{JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":45.2}")};
    Object[] inputParams_exit = new Object[]{JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":45.2}")};
    Object testedMethodResult = ClassCallingTestedClassWithFieldInjection.myStaticMethod((Double)inputParams_enter[0]);
    assertEquals(JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":135.60000000000002}"), testedMethodResult);
    assertEquals(inputParams_exit, inputParams_enter);

    //Check the number of calls to stub methods
    PowerMockito.verifyStatic(Mockito.times(1));
    TestedClass.myStaticMethod((Double)Mockito.any());
}
项目:FreeYourCode    文件:GeneratedByAgentTestMockPluginMediumMatcherModeTest.java   
@Test
public void testmyMethod2ParamPrimitifResultPrimitif_2() throws Exception {
    //Mock the stub methods
    Object[] myMethod2ParamPrimitifResultPrimitif_enter_0 = new Object[]{JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":45.2}"), JsonSerialisationUtils.deserialize("{\"@type\":\"com.freeyourcode.testgenerator.test.TestedBean\",\"libelle\":\"coucou\",\"value\":7,\"valueObject\":8}")};
    Object[] myMethod2ParamPrimitifResultPrimitif_diffsOnExit_1 = new Object[]{null, null};
    Object response0 = JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":90.4}");
    Mockito.when(testedClassStub.myMethod2ParamPrimitifResultPrimitif(argEq((Double)myMethod2ParamPrimitifResultPrimitif_enter_0[0]), argEq((TestedBean)myMethod2ParamPrimitifResultPrimitif_enter_0[1]))).then(exitAnswer(myMethod2ParamPrimitifResultPrimitif_diffsOnExit_1, response0));

    //Call to tested method
    Object[] inputParams_enter = new Object[]{JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":45.2}"), JsonSerialisationUtils.deserialize("{\"@type\":\"com.freeyourcode.testgenerator.test.TestedBean\",\"libelle\":\"coucou\",\"value\":7,\"valueObject\":8}")};
    Object[] inputParams_exit = new Object[]{JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":45.2}"), JsonSerialisationUtils.deserialize("{\"@type\":\"com.freeyourcode.testgenerator.test.TestedBean\",\"libelle\":\"coucou\",\"value\":7,\"valueObject\":8}")};
    Object testedMethodResult = classCallingTestedClassWithFieldInjection.myMethod2ParamPrimitifResultPrimitif((Double)inputParams_enter[0], (TestedBean)inputParams_enter[1]);
    assertEquals(JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":90.4}"), testedMethodResult);
    assertEquals(inputParams_exit, inputParams_enter);

    //Check the number of calls to stub methods
    Mockito.verify(testedClassStub, Mockito.times(1)).myMethod2ParamPrimitifResultPrimitif(Mockito.anyDouble(), (TestedBean)Mockito.any());
}
项目:FreeYourCode    文件:GeneratedByAgentTestMockPluginMediumMatcherModeTest.java   
@Test
public void testmyMethod2ParamPrimitifResultPrimitif_1() throws Exception {
    //Mock the stub methods
    Object[] myMethod2ParamPrimitifResultPrimitif_enter_0 = new Object[]{JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":45.2}"), JsonSerialisationUtils.deserialize("{\"@type\":\"com.freeyourcode.testgenerator.test.TestedBean\",\"libelle\":\"coucou\",\"value\":7,\"valueObject\":8,\"subBean\":{\"value2\":\"test\"}}")};
    Object[] myMethod2ParamPrimitifResultPrimitif_diffsOnExit_1 = new Object[]{null, null};
    Object response0 = JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":90.4}");
    Mockito.when(testedClassStub.myMethod2ParamPrimitifResultPrimitif(argEq((Double)myMethod2ParamPrimitifResultPrimitif_enter_0[0]), argEq((TestedBean)myMethod2ParamPrimitifResultPrimitif_enter_0[1]))).then(exitAnswer(myMethod2ParamPrimitifResultPrimitif_diffsOnExit_1, response0));

    //Call to tested method
    Object[] inputParams_enter = new Object[]{JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":45.2}"), JsonSerialisationUtils.deserialize("{\"@type\":\"com.freeyourcode.testgenerator.test.TestedBean\",\"libelle\":\"coucou\",\"value\":7,\"valueObject\":8,\"subBean\":{\"value2\":\"test\"}}")};
    Object[] inputParams_exit = new Object[]{JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":45.2}"), JsonSerialisationUtils.deserialize("{\"@type\":\"com.freeyourcode.testgenerator.test.TestedBean\",\"libelle\":\"coucou\",\"value\":7,\"valueObject\":8,\"subBean\":{\"value2\":\"test\"}}")};
    Object testedMethodResult = classCallingTestedClassWithFieldInjection.myMethod2ParamPrimitifResultPrimitif((Double)inputParams_enter[0], (TestedBean)inputParams_enter[1]);
    assertEquals(JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":90.4}"), testedMethodResult);
    assertEquals(inputParams_exit, inputParams_enter);

    //Check the number of calls to stub methods
    Mockito.verify(testedClassStub, Mockito.times(1)).myMethod2ParamPrimitifResultPrimitif(Mockito.anyDouble(), (TestedBean)Mockito.any());
}
项目:apollo-android    文件:TestQuery.java   
public Data(@Nullable String graphQlString, @Nullable String graphQlIdNullable,
    @Nonnull String graphQlIdNonNullable, @Nullable Long graphQlIntNullable,
    long graphQlIntNonNullable, @Nullable Double graphQlFloatNullable,
    double graphQlFloatNonNullable, @Nullable Boolean graphQlBooleanNullable,
    boolean graphQlBooleanNonNullable, @Nullable List<Long> graphQlListOfInt,
    @Nullable List<GraphQlListOfObject> graphQlListOfObjects) {
  this.graphQlString = Optional.fromNullable(graphQlString);
  this.graphQlIdNullable = Optional.fromNullable(graphQlIdNullable);
  this.graphQlIdNonNullable = Utils.checkNotNull(graphQlIdNonNullable, "graphQlIdNonNullable == null");
  this.graphQlIntNullable = Optional.fromNullable(graphQlIntNullable);
  this.graphQlIntNonNullable = graphQlIntNonNullable;
  this.graphQlFloatNullable = Optional.fromNullable(graphQlFloatNullable);
  this.graphQlFloatNonNullable = graphQlFloatNonNullable;
  this.graphQlBooleanNullable = Optional.fromNullable(graphQlBooleanNullable);
  this.graphQlBooleanNonNullable = graphQlBooleanNonNullable;
  this.graphQlListOfInt = Optional.fromNullable(graphQlListOfInt);
  this.graphQlListOfObjects = Optional.fromNullable(graphQlListOfObjects);
}
项目:apollo-android    文件:TestQuery.java   
@Override
public boolean equals(Object o) {
  if (o == this) {
    return true;
  }
  if (o instanceof Data) {
    Data that = (Data) o;
    return this.graphQlString.equals(that.graphQlString)
     && this.graphQlIdNullable.equals(that.graphQlIdNullable)
     && this.graphQlIdNonNullable.equals(that.graphQlIdNonNullable)
     && this.graphQlIntNullable.equals(that.graphQlIntNullable)
     && this.graphQlIntNonNullable == that.graphQlIntNonNullable
     && this.graphQlFloatNullable.equals(that.graphQlFloatNullable)
     && Double.doubleToLongBits(this.graphQlFloatNonNullable) == Double.doubleToLongBits(that.graphQlFloatNonNullable)
     && this.graphQlBooleanNullable.equals(that.graphQlBooleanNullable)
     && this.graphQlBooleanNonNullable == that.graphQlBooleanNonNullable
     && this.graphQlListOfInt.equals(that.graphQlListOfInt)
     && this.graphQlListOfObjects.equals(that.graphQlListOfObjects);
  }
  return false;
}
项目:FreeYourCode    文件:GeneratedByAgentTestMockPluginWithFullInjectionTest.java   
@Test
public void testmyMethod2ParamPrimitifResultPrimitif_1() throws Exception {
    //Mock the stub methods
    Object[] myMethod2ParamPrimitifResultPrimitif_enter_0 = new Object[]{JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":45.2}"), JsonSerialisationUtils.deserialize("{\"@type\":\"com.freeyourcode.testgenerator.test.TestedBean\",\"libelle\":\"coucou\",\"value\":7,\"valueObject\":8}")};
    Object[] myMethod2ParamPrimitifResultPrimitif_diffsOnExit_1 = new Object[]{null, null};
    Object response0 = JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":90.4}");
    Mockito.when(testedClassStub.myMethod2ParamPrimitifResultPrimitif(argEq((Double)myMethod2ParamPrimitifResultPrimitif_enter_0[0]), argEq((TestedBean)myMethod2ParamPrimitifResultPrimitif_enter_0[1]))).then(exitAnswer(myMethod2ParamPrimitifResultPrimitif_diffsOnExit_1, response0));

    //Call to tested method
    Object[] inputParams_enter = new Object[]{JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":45.2}"), JsonSerialisationUtils.deserialize("{\"@type\":\"com.freeyourcode.testgenerator.test.TestedBean\",\"libelle\":\"coucou\",\"value\":7,\"valueObject\":8}")};
    Object[] inputParams_exit = new Object[]{JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":45.2}"), JsonSerialisationUtils.deserialize("{\"@type\":\"com.freeyourcode.testgenerator.test.TestedBean\",\"libelle\":\"coucou\",\"value\":7,\"valueObject\":8}")};
    Object testedMethodResult = classCallingTestedClassWithFieldIni.myMethod2ParamPrimitifResultPrimitif((Double)inputParams_enter[0], (TestedBean)inputParams_enter[1]);
    assertEquals(JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":90.4}"), testedMethodResult);
    assertEquals(inputParams_exit, inputParams_enter);

    //Check the number of calls to stub methods
    Mockito.verify(testedClassStub, Mockito.times(1)).myMethod2ParamPrimitifResultPrimitif(Mockito.anyDouble(), (TestedBean)Mockito.any());
}
项目:FreeYourCode    文件:GeneratedByAgentTestMockPluginWithFullInjectionTest.java   
@Test
public void testmyMethod2ParamPrimitifResultPrimitif_15() throws Exception {
    //Mock the stub methods
    Object[] myMethod2ParamPrimitifResultPrimitif_enter_0 = new Object[]{JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":45.2}"), JsonSerialisationUtils.deserialize("{\"@type\":\"com.freeyourcode.testgenerator.test.TestedBean\",\"libelle\":\"coucou\",\"value\":7,\"valueObject\":8,\"subBean\":{\"value2\":\"test\"}}")};
    Object[] myMethod2ParamPrimitifResultPrimitif_diffsOnExit_1 = new Object[]{null, null};
    Object response0 = JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":90.4}");
    Mockito.when(testedClassStub.myMethod2ParamPrimitifResultPrimitif(argEq((Double)myMethod2ParamPrimitifResultPrimitif_enter_0[0]), argEq((TestedBean)myMethod2ParamPrimitifResultPrimitif_enter_0[1]))).then(exitAnswer(myMethod2ParamPrimitifResultPrimitif_diffsOnExit_1, response0));

    //Call to tested method
    Object[] inputParams_enter = new Object[]{JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":45.2}"), JsonSerialisationUtils.deserialize("{\"@type\":\"com.freeyourcode.testgenerator.test.TestedBean\",\"libelle\":\"coucou\",\"value\":7,\"valueObject\":8,\"subBean\":{\"value2\":\"test\"}}")};
    Object[] inputParams_exit = new Object[]{JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":45.2}"), JsonSerialisationUtils.deserialize("{\"@type\":\"com.freeyourcode.testgenerator.test.TestedBean\",\"libelle\":\"coucou\",\"value\":7,\"valueObject\":8,\"subBean\":{\"value2\":\"test\"}}")};
    Object testedMethodResult = classCallingTestedClassWithFieldIni.myMethod2ParamPrimitifResultPrimitif((Double)inputParams_enter[0], (TestedBean)inputParams_enter[1]);
    assertEquals(JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":90.4}"), testedMethodResult);
    assertEquals(inputParams_exit, inputParams_enter);

    //Check the number of calls to stub methods
    Mockito.verify(testedClassStub, Mockito.times(1)).myMethod2ParamPrimitifResultPrimitif(Mockito.anyDouble(), (TestedBean)Mockito.any());
}
项目:soabase-halva    文件:TestCase.java   
@Override
public int hashCode() {
    int result = name.hashCode();
    result = 31 * result + date;
    result = 31 * result + longList.hashCode();
    result = 31 * result + stringDateMap.hashCode();
    result = 31 * result + concurrentMap.hashCode();
    result = 31 * result + (truth ? 1 : 0);
    result = 31 * result + activation.hashCode();
    result = 31 * result + Double.hashCode(percent);
    result = 31 * result + Float.hashCode(section);
    result = 31 * result + isIt.hashCode();
    result = 31 * result + mutableValue.hashCode();
    result = 31 * result + charset.hashCode();
    return result;
}
项目:FreeYourCode    文件:GeneratedByAgentTestMockPluginWithInjectionTest.java   
@Test
public void testmyStaticMethod_0() throws Exception {
    //Mock the stub methods
    PowerMockito.mockStatic(TestedClass.class);
    Object[] myStaticMethod_enter_0 = new Object[]{JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":45.2}")};
    Object[] myStaticMethod_diffsOnExit_1 = new Object[]{null};
    Object response0 = JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":135.60000000000002}");
    Mockito.when(TestedClass.myStaticMethod(argEq((Double)myStaticMethod_enter_0[0]))).then(exitAnswer(myStaticMethod_diffsOnExit_1, response0));

    //Call to tested method
    Object[] inputParams_enter = new Object[]{JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":45.2}")};
    Object[] inputParams_exit = new Object[]{JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":45.2}")};
    Object testedMethodResult = ClassCallingTestedClassWithFieldInjection.myStaticMethod((Double)inputParams_enter[0]);
    assertEquals(JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":135.60000000000002}"), testedMethodResult);
    assertEquals(inputParams_exit, inputParams_enter);

    //Check the number of calls to stub methods
    PowerMockito.verifyStatic(Mockito.times(1));
    TestedClass.myStaticMethod((Double)Mockito.any());
}
项目:FreeYourCode    文件:GeneratedByAgentTestMockPluginWithFullInjectionTest.java   
@Test
public void testmyMethod1ParamResult_7() throws Exception {
    //Mock the stub methods
    Object[] myMethod1ParamResult_enter_0 = new Object[]{JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":9.0}")};
    Object[] myMethod1ParamResult_diffsOnExit_1 = new Object[]{null};
    Object response0 = JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":18.0}");
    Mockito.when(testedClassStub.myMethod1ParamResult(argEq((Double)myMethod1ParamResult_enter_0[0]))).then(exitAnswer(myMethod1ParamResult_diffsOnExit_1, response0));

    //Call to tested method
    Object[] inputParams_enter = new Object[]{JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":9.0}")};
    Object[] inputParams_exit = new Object[]{JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":9.0}")};
    Object testedMethodResult = classCallingTestedClassWithFieldIni.myMethod1ParamResult((Double)inputParams_enter[0]);
    assertEquals(JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":18.0}"), testedMethodResult);
    assertEquals(inputParams_exit, inputParams_enter);

    //Check the number of calls to stub methods
    Mockito.verify(testedClassStub, Mockito.times(1)).myMethod1ParamResult((Double)Mockito.any());
}
项目:FreeYourCode    文件:GeneratedByAgentTestMockPluginWithInjectionTest.java   
@Test
public void testmyMethod2ParamPrimitifResultPrimitif_2() throws Exception {
    //Mock the stub methods
    Object[] myMethod2ParamPrimitifResultPrimitif_enter_0 = new Object[]{JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":45.2}"), JsonSerialisationUtils.deserialize("{\"@type\":\"com.freeyourcode.testgenerator.test.TestedBean\",\"libelle\":\"coucou\",\"value\":7,\"valueObject\":8}")};
    Object[] myMethod2ParamPrimitifResultPrimitif_diffsOnExit_1 = new Object[]{null, null};
    Object response0 = JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":90.4}");
    Mockito.when(testedClassStub.myMethod2ParamPrimitifResultPrimitif(argEq((Double)myMethod2ParamPrimitifResultPrimitif_enter_0[0]), argEq((TestedBean)myMethod2ParamPrimitifResultPrimitif_enter_0[1]))).then(exitAnswer(myMethod2ParamPrimitifResultPrimitif_diffsOnExit_1, response0));

    //Call to tested method
    Object[] inputParams_enter = new Object[]{JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":45.2}"), JsonSerialisationUtils.deserialize("{\"@type\":\"com.freeyourcode.testgenerator.test.TestedBean\",\"libelle\":\"coucou\",\"value\":7,\"valueObject\":8}")};
    Object[] inputParams_exit = new Object[]{JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":45.2}"), JsonSerialisationUtils.deserialize("{\"@type\":\"com.freeyourcode.testgenerator.test.TestedBean\",\"libelle\":\"coucou\",\"value\":7,\"valueObject\":8}")};
    Object testedMethodResult = classCallingTestedClassWithFieldInjection.myMethod2ParamPrimitifResultPrimitif((Double)inputParams_enter[0], (TestedBean)inputParams_enter[1]);
    assertEquals(JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":90.4}"), testedMethodResult);
    assertEquals(inputParams_exit, inputParams_enter);

    //Check the number of calls to stub methods
    Mockito.verify(testedClassStub, Mockito.times(1)).myMethod2ParamPrimitifResultPrimitif(Mockito.anyDouble(), (TestedBean)Mockito.any());
}
项目:FreeYourCode    文件:GeneratedByAgentTestMockPluginWithInjectionTest.java   
@Test
public void testmyMethod1ParamNoResult_4() throws Exception {
    //Mock the stub methods
    Object[] myMethod1ParamNoResult_enter_0 = new Object[]{JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":17.14}")};
    Object[] myMethod1ParamNoResult_diffsOnExit_1 = new Object[]{null};
    Mockito.doAnswer(exitAnswer(myMethod1ParamNoResult_diffsOnExit_1)).when(testedClassStub).myMethod1ParamNoResult(argEq((Double)myMethod1ParamNoResult_enter_0[0]));

    //Call to tested method
    Object[] inputParams_enter = new Object[]{JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":17.14}")};
    Object[] inputParams_exit = new Object[]{JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":17.14}")};
    classCallingTestedClassWithFieldInjection.myMethod1ParamNoResult((Double)inputParams_enter[0]);
    assertEquals(inputParams_exit, inputParams_enter);

    //Check the number of calls to stub methods
    Mockito.verify(testedClassStub, Mockito.times(1)).myMethod1ParamNoResult((Double)Mockito.any());
}
项目:FreeYourCode    文件:GeneratedByAgentTestMockPluginMediumMatcherModeTest.java   
@Test
public void testmyMethod2ParamPrimitifResultPrimitif_3() throws Exception {
    //Mock the stub methods
    Object[] myMethod2ParamPrimitifResultPrimitif_enter_0 = new Object[]{JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":45.2}"), JsonSerialisationUtils.deserialize("{\"@type\":\"com.freeyourcode.testgenerator.test.TestedBean\",\"libelle\":\"coucou\",\"value\":7,\"valueObject\":8,\"subBean\":{\"value2\":\"test\"}}")};
    Object[] myMethod2ParamPrimitifResultPrimitif_diffsOnExit_1 = new Object[]{null, null};
    Object response0 = JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":90.4}");
    Mockito.when(testedClassStub.myMethod2ParamPrimitifResultPrimitif(argEq((Double)myMethod2ParamPrimitifResultPrimitif_enter_0[0]), argEq((TestedBean)myMethod2ParamPrimitifResultPrimitif_enter_0[1]))).then(exitAnswer(myMethod2ParamPrimitifResultPrimitif_diffsOnExit_1, response0));

    //Call to tested method
    Object[] inputParams_enter = new Object[]{JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":45.2}"), JsonSerialisationUtils.deserialize("{\"@type\":\"com.freeyourcode.testgenerator.test.TestedBean\",\"libelle\":\"coucou\",\"value\":7,\"valueObject\":8,\"subBean\":{\"value2\":\"test\"}}")};
    Object[] inputParams_exit = new Object[]{JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":45.2}"), JsonSerialisationUtils.deserialize("{\"@type\":\"com.freeyourcode.testgenerator.test.TestedBean\",\"libelle\":\"coucou\",\"value\":7,\"valueObject\":8,\"subBean\":{\"value2\":\"test\"}}")};
    Object testedMethodResult = classCallingTestedClassWithFieldInjection.myMethod2ParamPrimitifResultPrimitif((Double)inputParams_enter[0], (TestedBean)inputParams_enter[1]);
    assertEquals(JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":90.4}"), testedMethodResult);
    assertEquals(inputParams_exit, inputParams_enter);

    //Check the number of calls to stub methods
    Mockito.verify(testedClassStub, Mockito.times(1)).myMethod2ParamPrimitifResultPrimitif(Mockito.anyDouble(), (TestedBean)Mockito.any());
}
项目:FreeYourCode    文件:GeneratedByAgentTestMockPluginWithInjectionTest.java   
@Test
public void testmyMethod1ParamPrimitifResultPrimitif_6() throws Exception {
    //Mock the stub methods
    Object[] myMethod1ParamPrimitifResultPrimitif_enter_0 = new Object[]{JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":4.0003}")};
    Object[] myMethod1ParamPrimitifResultPrimitif_diffsOnExit_1 = new Object[]{null};
    Object response0 = JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":8.0006}");
    Mockito.when(testedClassStub.myMethod1ParamPrimitifResultPrimitif(argEq((Double)myMethod1ParamPrimitifResultPrimitif_enter_0[0]))).then(exitAnswer(myMethod1ParamPrimitifResultPrimitif_diffsOnExit_1, response0));

    //Call to tested method
    Object[] inputParams_enter = new Object[]{JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":4.0003}")};
    Object[] inputParams_exit = new Object[]{JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":4.0003}")};
    Object testedMethodResult = classCallingTestedClassWithFieldInjection.myMethod1ParamPrimitifResultPrimitif((Double)inputParams_enter[0]);
    assertEquals(JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":8.0006}"), testedMethodResult);
    assertEquals(inputParams_exit, inputParams_enter);

    //Check the number of calls to stub methods
    Mockito.verify(testedClassStub, Mockito.times(1)).myMethod1ParamPrimitifResultPrimitif(Mockito.anyDouble());
}
项目:FreeYourCode    文件:GeneratedByAgentTestMockPluginWithInjectionTest.java   
@Test
public void testmyMethod1ParamPrimitifResultPrimitif_7() throws Exception {
    //Mock the stub methods
    Object[] myMethod1ParamPrimitifResultPrimitif_enter_0 = new Object[]{JsonSerialisationUtils.deserialize("{\"@type\":\"double\"}")};
    Object[] myMethod1ParamPrimitifResultPrimitif_diffsOnExit_1 = new Object[]{null};
    Object response0 = JsonSerialisationUtils.deserialize("{\"@type\":\"double\"}");
    Mockito.when(testedClassStub.myMethod1ParamPrimitifResultPrimitif(argEq((Double)myMethod1ParamPrimitifResultPrimitif_enter_0[0]))).then(exitAnswer(myMethod1ParamPrimitifResultPrimitif_diffsOnExit_1, response0));

    //Call to tested method
    Object[] inputParams_enter = new Object[]{JsonSerialisationUtils.deserialize("{\"@type\":\"double\"}")};
    Object[] inputParams_exit = new Object[]{JsonSerialisationUtils.deserialize("{\"@type\":\"double\"}")};
    Object testedMethodResult = classCallingTestedClassWithFieldInjection.myMethod1ParamPrimitifResultPrimitif((Double)inputParams_enter[0]);
    assertEquals(JsonSerialisationUtils.deserialize("{\"@type\":\"double\"}"), testedMethodResult);
    assertEquals(inputParams_exit, inputParams_enter);

    //Check the number of calls to stub methods
    Mockito.verify(testedClassStub, Mockito.times(1)).myMethod1ParamPrimitifResultPrimitif(Mockito.anyDouble());
}
项目:FreeYourCode    文件:GeneratedByAgentTestMockPluginWithInjectionTest.java   
@Test
public void testmyMethod1ParamResult_8() throws Exception {
    //Mock the stub methods
    Object[] myMethod1ParamResult_enter_0 = new Object[]{JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":9.0}")};
    Object[] myMethod1ParamResult_diffsOnExit_1 = new Object[]{null};
    Object response0 = JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":18.0}");
    Mockito.when(testedClassStub.myMethod1ParamResult(argEq((Double)myMethod1ParamResult_enter_0[0]))).then(exitAnswer(myMethod1ParamResult_diffsOnExit_1, response0));

    //Call to tested method
    Object[] inputParams_enter = new Object[]{JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":9.0}")};
    Object[] inputParams_exit = new Object[]{JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":9.0}")};
    Object testedMethodResult = classCallingTestedClassWithFieldInjection.myMethod1ParamResult((Double)inputParams_enter[0]);
    assertEquals(JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":18.0}"), testedMethodResult);
    assertEquals(inputParams_exit, inputParams_enter);

    //Check the number of calls to stub methods
    Mockito.verify(testedClassStub, Mockito.times(1)).myMethod1ParamResult((Double)Mockito.any());
}
项目:FreeYourCode    文件:GeneratedByAgentTestMockPluginWithInjectionTest.java   
@Test
public void testmyMethod2ParamNoResult_10() throws Exception {
    //Mock the stub methods
    Object[] myMethod2ParamNoResult_enter_0 = new Object[]{JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":8.0}"), JsonSerialisationUtils.deserialize("{\"@type\":\"com.freeyourcode.testgenerator.test.TestedBean\",\"libelle\":\"lib\",\"value\":1,\"valueObject\":2}")};
    Object[] myMethod2ParamNoResult_diffsOnExit_1 = new Object[]{null, null};
    Mockito.doAnswer(exitAnswer(myMethod2ParamNoResult_diffsOnExit_1)).when(testedClassStub).myMethod2ParamNoResult(argEq((Double)myMethod2ParamNoResult_enter_0[0]), argEq((TestedBean)myMethod2ParamNoResult_enter_0[1]));

    //Call to tested method
    Object[] inputParams_enter = new Object[]{JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":8.0}"), JsonSerialisationUtils.deserialize("{\"@type\":\"com.freeyourcode.testgenerator.test.TestedBean\",\"libelle\":\"lib\",\"value\":1,\"valueObject\":2}")};
    Object[] inputParams_exit = new Object[]{JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":8.0}"), JsonSerialisationUtils.deserialize("{\"@type\":\"com.freeyourcode.testgenerator.test.TestedBean\",\"libelle\":\"lib\",\"value\":1,\"valueObject\":2}")};
    classCallingTestedClassWithFieldInjection.myMethod2ParamNoResult((Double)inputParams_enter[0], (TestedBean)inputParams_enter[1]);
    assertEquals(inputParams_exit, inputParams_enter);

    //Check the number of calls to stub methods
    Mockito.verify(testedClassStub, Mockito.times(1)).myMethod2ParamNoResult((Double)Mockito.any(), (TestedBean)Mockito.any());
}
项目:FreeYourCode    文件:GeneratedByAgentTestMockPluginWithInjectionTest.java   
@Test
public void testmyMethod2ParamNoResult_11() throws Exception {
    //Mock the stub methods
    Object[] myMethod2ParamNoResult_enter_0 = new Object[]{JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":8.0}"), null};
    Object[] myMethod2ParamNoResult_diffsOnExit_1 = new Object[]{null, null};
    Mockito.doAnswer(exitAnswer(myMethod2ParamNoResult_diffsOnExit_1)).when(testedClassStub).myMethod2ParamNoResult(argEq((Double)myMethod2ParamNoResult_enter_0[0]), argEq((TestedBean)myMethod2ParamNoResult_enter_0[1]));

    //Call to tested method
    Object[] inputParams_enter = new Object[]{JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":8.0}"), null};
    Object[] inputParams_exit = new Object[]{JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":8.0}"), null};
    classCallingTestedClassWithFieldInjection.myMethod2ParamNoResult((Double)inputParams_enter[0], (TestedBean)inputParams_enter[1]);
    assertEquals(inputParams_exit, inputParams_enter);

    //Check the number of calls to stub methods
    Mockito.verify(testedClassStub, Mockito.times(1)).myMethod2ParamNoResult((Double)Mockito.any(), (TestedBean)Mockito.any());
}
项目:FreeYourCode    文件:GeneratedByAgentTestMockPluginWithInjectionTest.java   
@Test
public void testmyMethod2ParamNoResult_12() throws Exception {
    //Mock the stub methods
    Object[] myMethod2ParamNoResult_enter_0 = new Object[]{JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":8.0}"), JsonSerialisationUtils.deserialize("{\"@type\":\"com.freeyourcode.testgenerator.test.TestedBean\",\"valueObject\":0}")};
    Object[] myMethod2ParamNoResult_diffsOnExit_1 = new Object[]{null, null};
    Mockito.doAnswer(exitAnswer(myMethod2ParamNoResult_diffsOnExit_1)).when(testedClassStub).myMethod2ParamNoResult(argEq((Double)myMethod2ParamNoResult_enter_0[0]), argEq((TestedBean)myMethod2ParamNoResult_enter_0[1]));

    //Call to tested method
    Object[] inputParams_enter = new Object[]{JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":8.0}"), JsonSerialisationUtils.deserialize("{\"@type\":\"com.freeyourcode.testgenerator.test.TestedBean\",\"valueObject\":0}")};
    Object[] inputParams_exit = new Object[]{JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":8.0}"), JsonSerialisationUtils.deserialize("{\"@type\":\"com.freeyourcode.testgenerator.test.TestedBean\",\"valueObject\":0}")};
    classCallingTestedClassWithFieldInjection.myMethod2ParamNoResult((Double)inputParams_enter[0], (TestedBean)inputParams_enter[1]);
    assertEquals(inputParams_exit, inputParams_enter);

    //Check the number of calls to stub methods
    Mockito.verify(testedClassStub, Mockito.times(1)).myMethod2ParamNoResult((Double)Mockito.any(), (TestedBean)Mockito.any());
}
项目:FreeYourCode    文件:GeneratedByAgentTestMockPluginWithInjectionTest.java   
@Test
public void testmyMethod2ParamNoResult_13() throws Exception {
    //Mock the stub methods
    Object[] myMethod2ParamNoResult_enter_0 = new Object[]{JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":8.0}"), JsonSerialisationUtils.deserialize("{\"@type\":\"com.freeyourcode.testgenerator.test.TestedBean\"}")};
    Object[] myMethod2ParamNoResult_diffsOnExit_1 = new Object[]{null, null};
    Mockito.doAnswer(exitAnswer(myMethod2ParamNoResult_diffsOnExit_1)).when(testedClassStub).myMethod2ParamNoResult(argEq((Double)myMethod2ParamNoResult_enter_0[0]), argEq((TestedBean)myMethod2ParamNoResult_enter_0[1]));

    //Call to tested method
    Object[] inputParams_enter = new Object[]{JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":8.0}"), JsonSerialisationUtils.deserialize("{\"@type\":\"com.freeyourcode.testgenerator.test.TestedBean\"}")};
    Object[] inputParams_exit = new Object[]{JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":8.0}"), JsonSerialisationUtils.deserialize("{\"@type\":\"com.freeyourcode.testgenerator.test.TestedBean\"}")};
    classCallingTestedClassWithFieldInjection.myMethod2ParamNoResult((Double)inputParams_enter[0], (TestedBean)inputParams_enter[1]);
    assertEquals(inputParams_exit, inputParams_enter);

    //Check the number of calls to stub methods
    Mockito.verify(testedClassStub, Mockito.times(1)).myMethod2ParamNoResult((Double)Mockito.any(), (TestedBean)Mockito.any());
}
项目:FreeYourCode    文件:GeneratedByAgentTestMockPluginWithInjectionTest.java   
@Test
public void testmyMethod2ParamNoResult_14() throws Exception {
    //Mock the stub methods
    Object[] myMethod2ParamNoResult_enter_0 = new Object[]{JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":8.0}"), JsonSerialisationUtils.deserialize("{\"@type\":\"com.freeyourcode.testgenerator.test.TestedBean\"}")};
    Object[] myMethod2ParamNoResult_diffsOnExit_1 = new Object[]{null, null};
    Mockito.doAnswer(exitAnswer(myMethod2ParamNoResult_diffsOnExit_1)).when(testedClassStub).myMethod2ParamNoResult(argEq((Double)myMethod2ParamNoResult_enter_0[0]), argEq((TestedBean)myMethod2ParamNoResult_enter_0[1]));

    //Call to tested method
    Object[] inputParams_enter = new Object[]{JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":8.0}"), JsonSerialisationUtils.deserialize("{\"@type\":\"com.freeyourcode.testgenerator.test.TestedBean\"}")};
    Object[] inputParams_exit = new Object[]{JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":8.0}"), JsonSerialisationUtils.deserialize("{\"@type\":\"com.freeyourcode.testgenerator.test.TestedBean\"}")};
    classCallingTestedClassWithFieldInjection.myMethod2ParamNoResult((Double)inputParams_enter[0], (TestedBean)inputParams_enter[1]);
    assertEquals(inputParams_exit, inputParams_enter);

    //Check the number of calls to stub methods
    Mockito.verify(testedClassStub, Mockito.times(1)).myMethod2ParamNoResult((Double)Mockito.any(), (TestedBean)Mockito.any());
}
项目:FreeYourCode    文件:GeneratedByAgentTestMockPluginWithInjectionTest.java   
@Test
public void testmyMethod2ParamPrimitifResultPrimitif_15() throws Exception {
    //Mock the stub methods
    Object[] myMethod2ParamPrimitifResultPrimitif_enter_0 = new Object[]{JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":45.2}"), JsonSerialisationUtils.deserialize("{\"@type\":\"com.freeyourcode.testgenerator.test.TestedBean\",\"libelle\":\"coucou\",\"value\":7,\"valueObject\":8}")};
    Object[] myMethod2ParamPrimitifResultPrimitif_diffsOnExit_1 = new Object[]{null, null};
    Object response0 = JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":90.4}");
    Mockito.when(testedClassStub.myMethod2ParamPrimitifResultPrimitif(argEq((Double)myMethod2ParamPrimitifResultPrimitif_enter_0[0]), argEq((TestedBean)myMethod2ParamPrimitifResultPrimitif_enter_0[1]))).then(exitAnswer(myMethod2ParamPrimitifResultPrimitif_diffsOnExit_1, response0));

    //Call to tested method
    Object[] inputParams_enter = new Object[]{JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":45.2}"), JsonSerialisationUtils.deserialize("{\"@type\":\"com.freeyourcode.testgenerator.test.TestedBean\",\"libelle\":\"coucou\",\"value\":7,\"valueObject\":8}")};
    Object[] inputParams_exit = new Object[]{JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":45.2}"), JsonSerialisationUtils.deserialize("{\"@type\":\"com.freeyourcode.testgenerator.test.TestedBean\",\"libelle\":\"coucou\",\"value\":7,\"valueObject\":8}")};
    Object testedMethodResult = classCallingTestedClassWithFieldInjection.myMethod2ParamPrimitifResultPrimitif((Double)inputParams_enter[0], (TestedBean)inputParams_enter[1]);
    assertEquals(JsonSerialisationUtils.deserialize("{\"@type\":\"double\",\"value\":90.4}"), testedMethodResult);
    assertEquals(inputParams_exit, inputParams_enter);

    //Check the number of calls to stub methods
    Mockito.verify(testedClassStub, Mockito.times(1)).myMethod2ParamPrimitifResultPrimitif(Mockito.anyDouble(), (TestedBean)Mockito.any());
}