Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
01c04247
Kaydet (Commit)
01c04247
authored
Agu 11, 2014
tarafından
Noel Grandin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
remove unnecessary use of Java reflection
Change-Id: I1cbbd8ee34684ec0fd74cd59529276b31eb7d1c2
üst
1cb2573c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
28 deletions
+5
-28
MasterDetailForms.java
forms/qa/integration/forms/MasterDetailForms.java
+5
-28
No files found.
forms/qa/integration/forms/MasterDetailForms.java
Dosyayı görüntüle @
01c04247
...
@@ -21,7 +21,6 @@ package integration.forms;
...
@@ -21,7 +21,6 @@ package integration.forms;
import
com.sun.star.beans.NamedValue
;
import
com.sun.star.beans.NamedValue
;
import
com.sun.star.beans.XPropertySet
;
import
com.sun.star.beans.XPropertySet
;
import
com.sun.star.container.XIndexContainer
;
import
com.sun.star.container.XIndexContainer
;
import
java.lang.reflect.Method
;
import
com.sun.star.uno.UnoRuntime
;
import
com.sun.star.uno.UnoRuntime
;
import
com.sun.star.lang.XMultiServiceFactory
;
import
com.sun.star.lang.XMultiServiceFactory
;
...
@@ -156,16 +155,14 @@ public class MasterDetailForms extends complexlib.ComplexTestCase implements com
...
@@ -156,16 +155,14 @@ public class MasterDetailForms extends complexlib.ComplexTestCase implements com
loadDetail
.
addLoadListener
(
this
);
loadDetail
.
addLoadListener
(
this
);
// wait until the detail form is loaded
// wait until the detail form is loaded
operateMasterAndWaitForDetailForm
(
loadMaster
.
getClass
().
getMethod
(
"load"
,
new
Class
[]
{}
),
loadMaster
,
new
Object
[]
{
}
);
loadMaster
.
load
();
impl_waitForLoadedEvent
();
// okay, now the master form should be on the first record
// okay, now the master form should be on the first record
assure
(
"wrong form state after loading (ID1)"
,
m_masterResult
.
getInt
(
1
)
==
1
);
assure
(
"wrong form state after loading (ID1)"
,
m_masterResult
.
getInt
(
1
)
==
1
);
assure
(
"wrong form state after loading (ID2)"
,
m_masterResult
.
getInt
(
2
)
==
1
);
assure
(
"wrong form state after loading (ID2)"
,
m_masterResult
.
getInt
(
2
)
==
1
);
assure
(
"wrong form state after loading (value)"
,
m_masterResult
.
getString
(
3
).
equals
(
"First Record"
)
);
assure
(
"wrong form state after loading (value)"
,
m_masterResult
.
getString
(
3
).
equals
(
"First Record"
)
);
// the "XResultSet.next" method
Method
methodNext
=
m_masterResult
.
getClass
().
getMethod
(
"next"
,
new
Class
[]
{}
);
// the values in the linked fields should be identical
// the values in the linked fields should be identical
int
expectedDetailRowCounts
[]
=
{
2
,
1
};
int
expectedDetailRowCounts
[]
=
{
2
,
1
};
do
do
...
@@ -178,7 +175,9 @@ public class MasterDetailForms extends complexlib.ComplexTestCase implements com
...
@@ -178,7 +175,9 @@ public class MasterDetailForms extends complexlib.ComplexTestCase implements com
assure
(
"wrong number of records in detail form, for master form at pos "
+
masterPos
,
assure
(
"wrong number of records in detail form, for master form at pos "
+
masterPos
,
((
Integer
)
m_detailForm
.
getPropertyValue
(
"RowCount"
)).
intValue
()
==
expectedDetailRowCounts
[
masterPos
-
1
]
);
((
Integer
)
m_detailForm
.
getPropertyValue
(
"RowCount"
)).
intValue
()
==
expectedDetailRowCounts
[
masterPos
-
1
]
);
operateMasterAndWaitForDetailForm
(
methodNext
,
m_masterResult
,
new
Object
[]
{}
);
if
(!
m_masterResult
.
next
())
return
;
impl_waitForLoadedEvent
();
}
}
while
(
!
m_masterResult
.
isAfterLast
()
);
while
(
!
m_masterResult
.
isAfterLast
()
);
assure
(
"wrong number of records in master form"
,
2
==
((
Integer
)
m_masterForm
.
getPropertyValue
(
"RowCount"
)).
intValue
()
);
assure
(
"wrong number of records in master form"
,
2
==
((
Integer
)
m_masterForm
.
getPropertyValue
(
"RowCount"
)).
intValue
()
);
...
@@ -341,28 +340,6 @@ public class MasterDetailForms extends complexlib.ComplexTestCase implements com
...
@@ -341,28 +340,6 @@ public class MasterDetailForms extends complexlib.ComplexTestCase implements com
return
column
;
return
column
;
}
}
/* ------------------------------------------------------------------ */
/** executes an operation on the master, and waits until the detail form has been (re)loaded aferwards
*/
private
void
operateMasterAndWaitForDetailForm
(
Method
_masterMethod
,
Object
_masterInterface
,
Object
[]
_methodParameters
)
throws
SQLException
{
Object
result
;
try
{
result
=
_masterMethod
.
invoke
(
_masterInterface
,
_methodParameters
);
}
catch
(
java
.
lang
.
Exception
e
)
{
throw
new
SQLException
(
"invoking "
+
_masterMethod
.
getName
()
+
" failed"
,
new
Object
(),
""
,
0
,
new
Object
()
);
}
if
(
_masterMethod
.
getReturnType
().
getName
().
equals
(
"boolean"
)
)
if
(
!((
Boolean
)
result
).
booleanValue
()
)
return
;
impl_waitForLoadedEvent
();
}
private
void
impl_waitForLoadedEvent
()
private
void
impl_waitForLoadedEvent
()
{
{
synchronized
(
m_waitForLoad
)
synchronized
(
m_waitForLoad
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment