Feature #1601
RCP: X.X, create test suits for annotation managers
| Statut: | Closed | Début: | 02/12/2015 | |
|---|---|---|---|---|
| Priorité: | Normal | Echéance: | ||
| Assigné à: | - | % réalisé: | 100% |
|
| Catégorie: | UnitTest | Temps passé: | - | |
| Version cible: | TXM Annotation 1.0 |
Description
We must try to cover all cases of Annotation manipulations (Create, update, delete) and ensure that annotation collisions are detected
Solution 1¶
Create a Test class for each Annotation manager :- JPAAnnotationManager (temporary annotations)
- CQPAnnotationManager (saved annotations)
- AnnotationManager (all annotations)
Historique
#1 Mis à jour par Matthieu Decorde il y a environ 11 ans
******************** *** ********************
******************** JPA ********************
******************** *** ********************
============== Creation with no overlap ==============
--- Create : T1[3-3]=V1
No overlap for [val1] ? colision = []
--- Create : T1[10-12]=V2
No overlap for [val2] ? colision = []
ID Type Val startPos startEnd Text
----------------------------------------------------
T1 V1 3 3
T1 V2 10 12
============== Creation overlap with same type ==============
---Overlap with : T1[10-12]=V2
ON START impossible [val3:9-12], colision = [T1[10-12]=V2]
ID Type Val startPos startEnd Text
----------------------------------------------------
T1 V1 3 3
T1 V2 10 12
---Overlap with : T1[10-12]=V2
ON END impossible [val3:12-13], colision = [T1[10-12]=V2]
---Overlap with : T1[10-12]=V2
OUTTER impossible [val3:9-13], colision = [T1[10-12]=V2]
---Overlap with : T1[10-12]=V2
INNER impossible [val3:11], colision = [T1[10-12]=V2]
ID Type Val startPos startEnd Text
----------------------------------------------------
T1 V1 3 3
T1 V2 10 12
--- Create : T1[23-24]=V3
No overlap for [val3] ? colision = []
--- Create : T1[45-50]=V4
No overlap for [val4] ? colision = []
ID Type Val startPos startEnd Text
----------------------------------------------------
T1 V1 3 3
T1 V2 10 12
T1 V3 23 24
T1 V4 45 50
============== Creation overlap with another type =============
---Overlap with : T1[10-12]=V2
ON START impossible with [val2:10-12], for [val4:9-11], colision = [T1[10-12]=V2]
ID Type Val startPos startEnd Text
----------------------------------------------------
T1 V1 3 3
T1 V2 10 12
T1 V3 23 24
T1 V4 45 50
---Overlap with : T1[10-12]=V2
ON END impossible with [val2:10-12], for [val5:11-14], colision = [T1[10-12]=V2]
ID Type Val startPos startEnd Text
----------------------------------------------------
T1 V1 3 3
T1 V2 10 12
T1 V3 23 24
T1 V4 45 50
--- Create : T2[22-26]=V6
OUTTER possible with [val3:23-24], for [val6:22-26], colision = []
ID Type Val startPos startEnd Text
----------------------------------------------------
T1 V1 3 3
T1 V2 10 12
T2 V6 22 26
T1 V3 23 24
T1 V4 45 50
--- Create : T2[47-47]=V7
INNER possible with [val4:45-50], for [val7:47], colision = []
ID Type Val startPos startEnd Text
----------------------------------------------------
T1 V1 3 3
T1 V2 10 12
T2 V6 22 26
T1 V3 23 24
T1 V4 45 50
T2 V7 47 47
============== Updating ==============
Annot BEFORE UPDATING : 0
---Overlap with : T1[23-24]=V3
============== Deleting ==============
--- Create : T2[17-19]=V8
creating [val8] ? overlap colision = []
Annot BEFORE DELETING : T2[17-19]=V8
Annot AFTER DELETING : 0
******************** *** ********************
******************** CQP ********************
******************** *** ********************
T1 : 2
T1[3-3]=V1
T1[10-12]=V2
T2 : 3
T2[2-5]=V5
T2[11-11]=V4
T2[24-29]=V3
============== Get overlapping of annotations for a type ==============
[[2, 2], [4, 4], [3, 3], [2, 3], [3, 4], [2, 5]]
Overlaps for T1_name at [2, 2] ? []
Overlaps for T1_name at [4, 4] ? []
Overlaps for T1_name at [3, 3] ? [T1[3-3]=V1]
Overlaps for T1_name at [2, 3] ? [T1[3-3]=V1]
Overlaps for T1_name at [3, 4] ? [T1[3-3]=V1]
Overlaps for T1_name at [2, 5] ? [T1[3-3]=V1]
Overlaps for T2_name at [2, 2] ? [T2[2-5]=V5]
Overlaps for T2_name at [4, 4] ? [T2[2-5]=V5]
Overlaps for T2_name at [3, 3] ? [T2[2-5]=V5]
Overlaps for T2_name at [2, 3] ? [T2[2-5]=V5]
Overlaps for T2_name at [3, 4] ? [T2[2-5]=V5]
Overlaps for T2_name at [2, 5] ? [T2[2-5]=V5]
============== Get overlapping of annotations for a type ==============
[[9, 9], [13, 13], [11, 11], [10, 11], [11, 12], [9, 10], [9, 11], [12, 14], [9, 10], [9, 13]]
Overlaps for T1_name at [9, 9] ? []
Overlaps for T1_name at [13, 13] ? []
Overlaps for T1_name at [11, 11] ? [T1[10-12]=V2]
Overlaps for T1_name at [10, 11] ? [T1[10-12]=V2]
Overlaps for T1_name at [11, 12] ? [T1[10-12]=V2]
Overlaps for T1_name at [9, 10] ? [T1[10-12]=V2]
Overlaps for T1_name at [9, 11] ? [T1[10-12]=V2]
Overlaps for T1_name at [12, 14] ? [T1[10-12]=V2]
Overlaps for T1_name at [9, 10] ? [T1[10-12]=V2]
Overlaps for T1_name at [9, 13] ? [T1[10-12]=V2]
Overlaps for T2_name at [9, 9] ? []
Overlaps for T2_name at [13, 13] ? []
Overlaps for T2_name at [11, 11] ? [T2[11-11]=V4]
Overlaps for T2_name at [10, 11] ? [T2[11-11]=V4]
Overlaps for T2_name at [11, 12] ? [T2[11-11]=V4]
Overlaps for T2_name at [9, 10] ? []
Overlaps for T2_name at [9, 11] ? [T2[11-11]=V4]
Overlaps for T2_name at [12, 14] ? []
Overlaps for T2_name at [9, 10] ? []
Overlaps for T2_name at [9, 13] ? [T2[11-11]=V4]
============== Get ALL overlapping annotations of annotations ==============
[[2, 2], [4, 4], [3, 3], [2, 3], [3, 4], [2, 5]]
Overlaps at [2, 2] ? [T2[2-5]=V5]
Overlaps at [4, 4] ? [T2[2-5]=V5]
Overlaps at [3, 3] ? [T2[2-5]=V5, T1[3-3]=V1]
Overlaps at [2, 3] ? [T2[2-5]=V5, T1[3-3]=V1]
Overlaps at [3, 4] ? [T2[2-5]=V5, T1[3-3]=V1]
Overlaps at [2, 5] ? [T2[2-5]=V5, T1[3-3]=V1]
============== Get ALL overlapping annotations of annotations==============
[[9, 9], [13, 13], [11, 11], [10, 11], [11, 12], [9, 10], [9, 11], [12, 14], [9, 10], [9, 13]]
Overlaps at [9, 9] ? []
Overlaps at [13, 13] ? []
Overlaps at [11, 11] ? [T2[11-11]=V4, T1[10-12]=V2]
Overlaps at [10, 11] ? [T2[11-11]=V4, T1[10-12]=V2]
Overlaps at [11, 12] ? [T2[11-11]=V4, T1[10-12]=V2]
Overlaps at [9, 10] ? [T1[10-12]=V2]
Overlaps at [9, 11] ? [T2[11-11]=V4, T1[10-12]=V2]
Overlaps at [12, 14] ? [T1[10-12]=V2]
Overlaps at [9, 10] ? [T1[10-12]=V2]
Overlaps at [9, 13] ? [T2[11-11]=V4, T1[10-12]=V2]
******************** *** ********************
******************** ALL ********************
******************** *** ********************
============== Create&Update ==============
======== No overlap, diff types ========
Test T1=V1(V1) at [<3, 3>]
--- Create : T1[3-3]=V1
--> no overlap for T1=V1(V1) at [<3, 3>] ? colision = {}
ID Type Val startPos startEnd Text
----------------------------------------------------
T1 V1 3 3
Test T1=V1(V1) at [<10, 12>]
--- Create : T1[10-12]=V1
--> no overlap for T1=V1(V1) at [<10, 12>] ? colision = {}
ID Type Val startPos startEnd Text
----------------------------------------------------
T1 V1 3 3
T1 V1 10 12
======== Creation overlap with same type ========
Test T1=V1(V1) at [<9, 10>]
--> ON START impossible for T1=V1(V1) at [<9, 10>] ? colision = {<9, 10>=[T1[10-12]=V2]}
ID Type Val startPos startEnd Text
----------------------------------------------------
T1 V1 3 3
T1 V1 10 12
Test T1=V1(V1) at [<12, 13>]
--> ON END impossible for T1=V1(V1) at [<12, 13>] ? colision = {<12, 13>=[T1[10-12]=V2]}
ID Type Val startPos startEnd Text
----------------------------------------------------
T1 V1 3 3
T1 V1 10 12
Test T1=V1(V1) at [<9, 13>]
--> OUTTER impossible for T1=V1(V1) at [<9, 13>] ? colision = {<9, 13>=[T1[10-12]=V2]}
ID Type Val startPos startEnd Text
----------------------------------------------------
T1 V1 3 3
T1 V1 10 12
Test T1=V1(V1) at [<11, 11>]
--> INNER impossible for T1=V1(V1) at [<11, 11>] ? colision = {<11, 11>=[T1[10-12]=V2]}
ID Type Val startPos startEnd Text
----------------------------------------------------
T1 V1 3 3
T1 V1 10 12
======== No overlap, diff types, pls words ========
Test T1=V1(V1) at [<23, 24>]
--> overlap for T1=V1(V1) at [<23, 24>] ? colision = {<23, 24>=[T2[24-29]=V3]}
ID Type Val startPos startEnd Text
----------------------------------------------------
T1 V1 3 3
T1 V1 10 12
Test T1=V1(V1) at [<45, 50>]
--- Create : T1[45-50]=V1
--> no overlap for T1=V1(V1) at [<45, 50>] ? colision = {}
ID Type Val startPos startEnd Text
----------------------------------------------------
T1 V1 3 3
T1 V1 10 12
T1 V1 45 50
======== Creation overlap with another type ========
Test T2=V5(V5) at [<9, 11>]
--> ON START impossible for T2=V5(V5) at [<9, 11>] ? colision = {<9, 11>=[T2[11-11]=V4, T1[10-12]=V2]}
ID Type Val startPos startEnd Text
----------------------------------------------------
T1 V1 3 3
T1 V1 10 12
T1 V1 45 50
Test T2=V5(V5) at [<11, 14>]
--> ON END impossible for T2=V5(V5) at [<11, 14>] ? colision = {<11, 14>=[T2[11-11]=V4, T1[10-12]=V2]}
ID Type Val startPos startEnd Text
----------------------------------------------------
T1 V1 3 3
T1 V1 10 12
T1 V1 45 50
Test T2=V5(V5) at [<22, 26>]
--> OUTTER possible for T2=V5(V5) at [<22, 26>] ? colision = {<22, 26>=[T2[24-29]=V3]}
ID Type Val startPos startEnd Text
----------------------------------------------------
T1 V1 3 3
T1 V1 10 12
T1 V1 45 50
Test T2=V5(V5) at [<47, 47>]
--- Create : T2[47-47]=V5
--> INNER possible for T2=V5(V5) at [<47, 47>] ? colision = {}
ID Type Val startPos startEnd Text
----------------------------------------------------
T1 V1 3 3
T1 V1 10 12
T1 V1 45 50
T2 V5 47 47
======== Updating values ========
Test T1=V2(V2) at [<47, 47>]
---Overlap with : T1[45-50]=V1
--> REPLACE TEMP for T1=V2(V2) at [<47, 47>] ? colision = {<47, 47>=[T1[45-50]=V1]}
ID Type Val startPos startEnd Text
----------------------------------------------------
T1 V1 3 3
T1 V1 10 12
T1 V1 45 50
T2 V5 47 47
Test T1=V2(V2) at [<3, 3>]
--- Update annot : T1[3-3]=V1 -----
--> REPLACE CQP for T1=V2(V2) at [<3, 3>] ? colision = {}
ID Type Val startPos startEnd Text
----------------------------------------------------
T1 V2 3 3
T1 V1 10 12
T1 V1 45 50
T2 V5 47 47
============== Deleting ==============
DELETE TEMPT2_name at [<7, 7>]
ID Type Val startPos startEnd Text
----------------------------------------------------
T1 V2 3 3
T1 V1 10 12
T1 V1 45 50
T2 V5 47 47
DELETE CQPT1_name at [<3, 3>]
struct for positions 3-3 -> 0-0
--- Update annot : T1[3-3]=V2 -----
ID Type Val startPos startEnd Text
----------------------------------------------------
T1 #del 3 3
T1 V1 10 12
T1 V1 45 50
T2 V5 47 47
============== CLean all ==============
Terminé: 923 ms
#2 Mis à jour par Matthieu Decorde il y a presque 11 ans
- Catégorie changé de Messages à UnitTest
#3 Mis à jour par Severine Gedzelman il y a presque 11 ans
- % réalisé changé de 60 à 80
#4 Mis à jour par Severine Gedzelman il y a presque 11 ans
Unifiying the writing of these tests
#5 Mis à jour par Matthieu Decorde il y a presque 11 ans
- Statut changé de New à Resolved
#6 Mis à jour par Sebastien Jacquot il y a presque 3 ans
- Statut changé de Resolved à Closed
- % réalisé changé de 80 à 100