Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
rest-tutoriel-tests-bdd
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
Martin Dorange
rest-tutoriel-tests-bdd
Commits
e67de261
Commit
e67de261
authored
4 years ago
by
Martin Dorange
Browse files
Options
Downloads
Patches
Plain Diff
test addfromform still not working
parent
a878c03f
Branches
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#8315
failed
4 years ago
Stage: build
Stage: test
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/fr/ulille/iut/todo/ressource/TodoRessource.java
+17
-5
17 additions, 5 deletions
...main/java/fr/ulille/iut/todo/ressource/TodoRessource.java
with
17 additions
and
5 deletions
src/main/java/fr/ulille/iut/todo/ressource/TodoRessource.java
+
17
−
5
View file @
e67de261
...
@@ -57,7 +57,7 @@ public class TodoRessource {
...
@@ -57,7 +57,7 @@ public class TodoRessource {
@GET
@GET
@Path
(
"{id}/description"
)
@Path
(
"{id}/description"
)
public
String
getDescription
(
@PathParam
(
"id"
)
UUID
id
)
{
public
String
getDescription
(
@PathParam
(
"id"
)
UUID
id
)
{
LOGGER
.
info
(
"get
d
escription()"
);
LOGGER
.
info
(
"get
D
escription()"
);
return
todoService
.
getTache
(
id
).
getDescription
();
return
todoService
.
getTache
(
id
).
getDescription
();
}
}
...
@@ -87,10 +87,22 @@ public class TodoRessource {
...
@@ -87,10 +87,22 @@ public class TodoRessource {
LOGGER
.
info
(
"createTacheFromForm()"
);
LOGGER
.
info
(
"createTacheFromForm()"
);
Tache
tache
=
new
Tache
();
Tache
tache
=
new
Tache
();
// tache.setNom(formParams.);
String
name
=
formParams
.
get
(
"nom"
).
get
(
0
);
System
.
out
.
println
(
name
);
tache
.
setNom
(
name
);
todoService
.
addTache
(
tache
);
URI
location
=
uri
.
getAbsolutePathBuilder
().
path
(
tache
.
getId
().
toString
()).
build
();
EntityTag
etag
=
new
EntityTag
(
Integer
.
toString
(
tache
.
hashCode
()));
ResponseBuilder
builder
=
request
.
evaluatePreconditions
(
etag
);
return
null
;
if
(
builder
==
null
)
{
builder
=
Response
.
created
(
location
);
builder
.
tag
(
etag
);
builder
.
entity
(
tache
);
}
return
builder
.
build
();
}
}
}
}
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