当前位置: 首页>>代码示例>>Java>>正文


Java Double类代码示例

本文整理汇总了Java中java.lang.Double的典型用法代码示例。如果您正苦于以下问题:Java Double类的具体用法?Java Double怎么用?Java Double使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


Double类属于java.lang包,在下文中一共展示了Double类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: testmyMethod2ParamNoResult_12

import java.lang.Double; //导入依赖的package包/类
@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());
}
 
开发者ID:BenoitRonflette,项目名称:FreeYourCode,代码行数:17,代码来源:GeneratedByAgentTestMockPluginWithFullInjectionTest.java

示例2: testmyMethod2ParamNoResult_13

import java.lang.Double; //导入依赖的package包/类
@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());
}
 
开发者ID:BenoitRonflette,项目名称:FreeYourCode,代码行数:17,代码来源:GeneratedByAgentTestMockPluginWithFullInjectionTest.java

示例3: testgetModifiedValue2FromMyMethodIsModifyingInput_18

import java.lang.Double; //导入依赖的package包/类
@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());
}
 
开发者ID:BenoitRonflette,项目名称:FreeYourCode,代码行数:18,代码来源:GeneratedByAgentTestMockPluginSoftMatcherModeTest.java

示例4: testabstractCompute_0

import java.lang.Double; //导入依赖的package包/类
@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());
}
 
开发者ID:BenoitRonflette,项目名称:FreeYourCode,代码行数:17,代码来源:GeneratedByAgentTestClassCallingGenericClassImpl.java

示例5: testmyMethod2ParamPrimitifResultPrimitif_0

import java.lang.Double; //导入依赖的package包/类
@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());
}
 
开发者ID:BenoitRonflette,项目名称:FreeYourCode,代码行数:19,代码来源:GeneratedByAgentTestSpyPluginTest.java

示例6: testmyMethod2ParamResult_17

import java.lang.Double; //导入依赖的package包/类
@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());
}
 
开发者ID:BenoitRonflette,项目名称:FreeYourCode,代码行数:19,代码来源:GeneratedByAgentTestMockPluginMediumMatcherModeTest.java

示例7: BgReadingMessage

import java.lang.Double; //导入依赖的package包/类
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;
}
 
开发者ID:NightscoutFoundation,项目名称:xDrip,代码行数:26,代码来源:BgReadingMessage.java

示例8: testmyMethod2ParamNoResult_10

import java.lang.Double; //导入依赖的package包/类
@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());
}
 
开发者ID:BenoitRonflette,项目名称:FreeYourCode,代码行数:17,代码来源:GeneratedByAgentTestMockPluginMediumMatcherModeTest.java

示例9: testmyMethod2ParamPrimitifResultPrimitif_0

import java.lang.Double; //导入依赖的package包/类
@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());
}
 
开发者ID:BenoitRonflette,项目名称:FreeYourCode,代码行数:19,代码来源:GeneratedByAgentTestMockPluginWithNewInstance.java

示例10: testmyMethod2ParamNoResult_9

import java.lang.Double; //导入依赖的package包/类
@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());
}
 
开发者ID:BenoitRonflette,项目名称:FreeYourCode,代码行数:17,代码来源:GeneratedByAgentTestMockPluginWithNewInstance.java

示例11: testmyMethod2ParamPrimitifResultPrimitif_1

import java.lang.Double; //导入依赖的package包/类
@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());
}
 
开发者ID:BenoitRonflette,项目名称:FreeYourCode,代码行数:19,代码来源:GeneratedByAgentTestMockPluginWithNewInstance.java

示例12: testmyMethod2ParamPrimitifResultPrimitif_15

import java.lang.Double; //导入依赖的package包/类
@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());
}
 
开发者ID:BenoitRonflette,项目名称:FreeYourCode,代码行数:19,代码来源:GeneratedByAgentTestSpyPluginTest.java

示例13: testmyMethod2ParamPrimitifResultPrimitif_14

import java.lang.Double; //导入依赖的package包/类
@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());
}
 
开发者ID:BenoitRonflette,项目名称:FreeYourCode,代码行数:19,代码来源:GeneratedByAgentTestMockPluginWithFullInjectionTest.java

示例14: testmyMethod1ParamPrimitifResultPrimitif_5

import java.lang.Double; //导入依赖的package包/类
@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());
}
 
开发者ID:BenoitRonflette,项目名称:FreeYourCode,代码行数:19,代码来源:GeneratedByAgentTestMockPluginWithNewInstance.java

示例15: testmyMethod1ParamPrimitifResultPrimitif_7

import java.lang.Double; //导入依赖的package包/类
@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());
}
 
开发者ID:BenoitRonflette,项目名称:FreeYourCode,代码行数:18,代码来源:GeneratedByAgentTestMockPluginSoftMatcherModeTest.java


注:本文中的java.lang.Double类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。