Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
TP-Java-Rendu
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hepia_2022-2023
Java
TP-Java-Rendu
Commits
42aeabdf
Commit
42aeabdf
authored
2 years ago
by
alec.schmidt
Browse files
Options
Downloads
Patches
Plain Diff
test 4
parent
5580a753
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
demo/src/test/java/ch/hepia/AppTest.java
+14
-3
14 additions, 3 deletions
demo/src/test/java/ch/hepia/AppTest.java
with
14 additions
and
3 deletions
demo/src/test/java/ch/hepia/AppTest.java
+
14
−
3
View file @
42aeabdf
...
@@ -37,7 +37,7 @@ public class AppTest
...
@@ -37,7 +37,7 @@ public class AppTest
* Test 01 : Testing the correct appending of a contact in the controller
* Test 01 : Testing the correct appending of a contact in the controller
*/
*/
@Test
@Test
public
void
a
ddContact
()
{
public
void
testA
ddContact
()
{
List
<
Contact
>
array
=
new
ArrayList
<
Contact
>();
List
<
Contact
>
array
=
new
ArrayList
<
Contact
>();
...
@@ -53,7 +53,7 @@ public class AppTest
...
@@ -53,7 +53,7 @@ public class AppTest
* Test 02 : Serialize and deserialize the data
* Test 02 : Serialize and deserialize the data
*/
*/
@Test
@Test
public
void
s
erializeData
()
{
public
void
testS
erializeData
()
{
String
folderTestPath
=
"./folderTest"
;
String
folderTestPath
=
"./folderTest"
;
File
f
=
new
File
(
folderTestPath
);
File
f
=
new
File
(
folderTestPath
);
...
@@ -75,7 +75,7 @@ public class AppTest
...
@@ -75,7 +75,7 @@ public class AppTest
}
}
/**
/**
* Test 03 :
* Test 03 :
Test the search function for a hit and a miss
*/
*/
@Test
@Test
public
void
testSearch
()
{
public
void
testSearch
()
{
...
@@ -85,4 +85,15 @@ public class AppTest
...
@@ -85,4 +85,15 @@ public class AppTest
assertEquals
(
found
.
getList
().
toString
(),
controller
.
getList
().
toString
());
assertEquals
(
found
.
getList
().
toString
(),
controller
.
getList
().
toString
());
assertNotSame
(
notFound
.
getList
().
toString
(),
controller
.
getList
().
toString
());
assertNotSame
(
notFound
.
getList
().
toString
(),
controller
.
getList
().
toString
());
}
}
/**
* Test 04 :
*/
@Test
public
void
testRemoveContact
()
{
List
<
Contact
>
emtpyArray
=
new
ArrayList
<
Contact
>();
controller
.
removeContact
(
c
);
assertEquals
(
emtpyArray
,
controller
.
getList
());
}
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment