Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Alvaro Ordóñez Romero
/
DAE-aha00026-aor00039
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
8625dafc
authored
Nov 22, 2023
by
Alvaro Ordóñez Romero
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Modificaciones necesarias
parent
b700332b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
0 deletions
src/test/java/com/carpooling/carpoolingaoraha/entidades/SolicitudTest.java
src/test/java/com/carpooling/carpoolingaoraha/entidades/SolicitudTest.java
0 → 100644
View file @
8625dafc
package
com
.
carpooling
.
carpoolingaoraha
.
entidades
;
import
org.junit.jupiter.api.Test
;
import
static
org
.
junit
.
jupiter
.
api
.
Assertions
.*;
public
class
SolicitudTest
{
@Test
public
void
testConstructorAndGetters
()
{
Reserva
reserva
=
new
Reserva
(
/* Argumentos de la reserva */
);
Usuario
pasajero
=
new
Usuario
(
/* Argumentos del usuario */
);
Solicitud
solicitud
=
new
Solicitud
(
reserva
,
pasajero
);
assertEquals
(
reserva
,
solicitud
.
getReserva
());
assertEquals
(
pasajero
,
solicitud
.
getPasajero
());
}
@Test
public
void
testSetters
()
{
Reserva
reserva1
=
new
Reserva
(
/* Argumentos de la reserva 1 */
);
Reserva
reserva2
=
new
Reserva
(
/* Argumentos de la reserva 2 */
);
Usuario
pasajero1
=
new
Usuario
(
/* Argumentos del usuario 1 */
);
Usuario
pasajero2
=
new
Usuario
(
/* Argumentos del usuario 2 */
);
Solicitud
solicitud
=
new
Solicitud
(
reserva1
,
pasajero1
);
solicitud
.
setReserva
(
reserva2
);
solicitud
.
setPasajero
(
pasajero2
);
assertEquals
(
reserva2
,
solicitud
.
getReserva
());
assertEquals
(
pasajero2
,
solicitud
.
getPasajero
());
}
}
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