diff options
Diffstat (limited to 'package')
-rw-r--r-- | package/qa/storages/Test06.java | 10 | ||||
-rw-r--r-- | package/qa/storages/Test09.java | 14 |
2 files changed, 12 insertions, 12 deletions
diff --git a/package/qa/storages/Test06.java b/package/qa/storages/Test06.java index 50ff5b5d9..0803389a1 100644 --- a/package/qa/storages/Test06.java +++ b/package/qa/storages/Test06.java @@ -64,10 +64,10 @@ public class Test06 implements StorageTest { // open new substorages XStorage xTempSubStorage1 = m_aTestHelper.openSubStorage( xTempStorage, "SubStorage1", - ElementModes.ELEMENT_WRITE ); + ElementModes.WRITE ); XStorage xTempSubStorage2 = m_aTestHelper.openSubStorage( xTempStorage, "SubStorage2", - ElementModes.ELEMENT_WRITE ); + ElementModes.WRITE ); if ( xTempSubStorage1 == null || xTempSubStorage2 == null ) { m_aTestHelper.Error( "Can't create substorage!" ); @@ -77,7 +77,7 @@ public class Test06 implements StorageTest { // in case stream is open for reading it must exist try { - xTempSubStorage1.openStreamElement( "NonExistingStream", ElementModes.ELEMENT_READ ); + xTempSubStorage1.openStreamElement( "NonExistingStream", ElementModes.READ ); m_aTestHelper.Error( "The method must throw an exception in case of try to open nonexistent stream for reading!" ); return false; } @@ -92,7 +92,7 @@ public class Test06 implements StorageTest { // in case a storage is open for reading it must exist try { - xTempSubStorage1.openStreamElement( "NonExistingStorage", ElementModes.ELEMENT_READ ); + xTempSubStorage1.openStreamElement( "NonExistingStorage", ElementModes.READ ); m_aTestHelper.Error( "The method must throw an exception in case of try to open nonexistent storage for reading!" ); return false; } @@ -198,7 +198,7 @@ public class Test06 implements StorageTest { // open a new substorage XStorage xTargetSubStorage = m_aTestHelper.openSubStorage( xTargetStorage, "SubStorage1", - ElementModes.ELEMENT_WRITE ); + ElementModes.WRITE ); if ( xTargetSubStorage == null ) { m_aTestHelper.Error( "Can't create substorage!" ); diff --git a/package/qa/storages/Test09.java b/package/qa/storages/Test09.java index 16cf9d5c0..c626283bd 100644 --- a/package/qa/storages/Test09.java +++ b/package/qa/storages/Test09.java @@ -42,13 +42,13 @@ public class Test09 implements StorageTest { return false; } - byte pPass1[] = { 1, 2, 3 }; - byte pPass2[] = { 3, 2, 1 }; + String sPass1 = "123"; + String sPass2 = "321"; byte pBytes[] = { 1, 1, 1, 1, 1 }; // open a new substream, set "MediaType" and "Compressed" properties to it and write some bytes // the stream will not be encrypted - if ( !m_aTestHelper.WriteBytesToEncrSubstream( xTempStorage, "SubStream1", "MediaType1", false, pBytes, pPass1 ) ) + if ( !m_aTestHelper.WriteBytesToEncrSubstream( xTempStorage, "SubStream1", "MediaType1", false, pBytes, sPass1 ) ) return false; // create temporary file @@ -62,7 +62,7 @@ public class Test09 implements StorageTest { // create temporary storage based on a previously created temporary file Object pArgs[] = new Object[2]; pArgs[0] = (Object) sTempFileURL; - pArgs[1] = new Integer( ElementModes.ELEMENT_WRITE ); + pArgs[1] = new Integer( ElementModes.WRITE ); Object oTempFileStorage = m_xStorageFactory.createInstanceWithArguments( pArgs ); XStorage xTempFileStorage = (XStorage)UnoRuntime.queryInterface( XStorage.class, oTempFileStorage ); @@ -78,7 +78,7 @@ public class Test09 implements StorageTest { return false; // change password of the substream of new storage based on file - int nResult = m_aTestHelper.ChangeStreamPass( xTempFileStorage, "SubStream1", pPass1, pPass2 ); + int nResult = m_aTestHelper.ChangeStreamPass( xTempFileStorage, "SubStream1", sPass1, sPass2 ); if ( nResult == 0 ) return false; // test failed else if ( nResult == -1 ) @@ -96,7 +96,7 @@ public class Test09 implements StorageTest { // ================================================ // the temporary file must not be locked any more after storage disposing - pArgs[1] = new Integer( ElementModes.ELEMENT_READ ); + pArgs[1] = new Integer( ElementModes.READ ); Object oResultStorage = m_xStorageFactory.createInstanceWithArguments( pArgs ); XStorage xResultStorage = (XStorage) UnoRuntime.queryInterface( XStorage.class, oResultStorage ); if ( xResultStorage == null ) @@ -105,7 +105,7 @@ public class Test09 implements StorageTest { return false; } - if ( !m_aTestHelper.checkEncrStream( xResultStorage, "SubStream1", "MediaType1", pBytes, pPass2 ) ) + if ( !m_aTestHelper.checkEncrStream( xResultStorage, "SubStream1", "MediaType1", pBytes, sPass2 ) ) return false; // dispose used storages to free resources |