private void CreatePrimitiveArrayInObject(DoubleHandlerUpdateTestCase.ItemArrays item) { double[] arr = new double[data.Length]; System.Array.Copy(data, 0, arr, 0, data.Length); item._primitiveArrayInObject = arr; }
private void CreateTypedWrapperArray(DoubleHandlerUpdateTestCase.ItemArrays item) { item._typedWrapperArray = new double[data.Length + 1]; for (int i = 0; i < data.Length; i++) { item._typedWrapperArray[i] = data[i]; } }
private void CreateWrapperArrayInObject(DoubleHandlerUpdateTestCase.ItemArrays item ) { double[] arr = new double[data.Length + 1]; for (int i = 0; i < data.Length; i++) { arr[i] = data[i]; } item._wrapperArrayInObject = arr; }
protected override void AssertArrays(IExtObjectContainer objectContainer, object obj) { DoubleHandlerUpdateTestCase.ItemArrays item = (DoubleHandlerUpdateTestCase.ItemArrays )obj; AssertTypedPrimitiveArray(item); AssertTypedWrapperArray(item); // Will be removed for .NET by sharpen. AssertPrimitiveArrayInObject(item); AssertWrapperArrayInObject(item); }
protected override object CreateArrays() { DoubleHandlerUpdateTestCase.ItemArrays item = new DoubleHandlerUpdateTestCase.ItemArrays (); CreateTypedPrimitiveArray(item); CreateTypedWrapperArray(item); // Will be removed for .NET by sharpen. CreatePrimitiveArrayInObject(item); CreateWrapperArrayInObject(item); return(item); }
private void AssertPrimitiveArrayInObject(DoubleHandlerUpdateTestCase.ItemArrays item) { if (Db4oHeaderVersion() == VersionServices.Header3040) { // Bug in the oldest format: It accidentally double[] arrays to Double[] arrays. AssertWrapperData((double[])item._primitiveArrayInObject); } else { AssertData((double[])item._primitiveArrayInObject); } }
private void AssertWrapperArrayInObject(DoubleHandlerUpdateTestCase.ItemArrays item ) { AssertWrapperData((double[])item._wrapperArrayInObject); }
private void AssertTypedWrapperArray(DoubleHandlerUpdateTestCase.ItemArrays item) { AssertWrapperData(item._typedWrapperArray); }
private void AssertTypedPrimitiveArray(DoubleHandlerUpdateTestCase.ItemArrays item ) { AssertData(item._typedPrimitiveArray); }
private void CreateTypedPrimitiveArray(DoubleHandlerUpdateTestCase.ItemArrays item ) { item._typedPrimitiveArray = new double[data.Length]; System.Array.Copy(data, 0, item._typedPrimitiveArray, 0, data.Length); }
protected override object CreateArrays() { DoubleHandlerUpdateTestCase.ItemArrays item = new DoubleHandlerUpdateTestCase.ItemArrays (); CreateTypedPrimitiveArray(item); CreateTypedWrapperArray(item); // Will be removed for .NET by sharpen. CreatePrimitiveArrayInObject(item); CreateWrapperArrayInObject(item); return item; }