Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cs427fa20team22
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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
htmoss2
cs427fa20team22
Commits
b5b655f2
Commit
b5b655f2
authored
4 years ago
by
adityab3
Browse files
Options
Downloads
Patches
Plain Diff
Added test case for duplicate email
parent
e8add254
No related branches found
No related tags found
1 merge request
!4
Uc91.2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
iTrust/test/edu/ncsu/csc/itrust/unit/action/AddPreRegisterPatientActionTest.java
+31
-0
31 additions, 0 deletions
...c/itrust/unit/action/AddPreRegisterPatientActionTest.java
with
31 additions
and
0 deletions
iTrust/test/edu/ncsu/csc/itrust/unit/action/AddPreRegisterPatientActionTest.java
+
31
−
0
View file @
b5b655f2
...
@@ -95,4 +95,35 @@ public class AddPreRegisterPatientActionTest extends TestCase {
...
@@ -95,4 +95,35 @@ public class AddPreRegisterPatientActionTest extends TestCase {
}
}
}
}
/**
* Ensure that duplicate emails are not allowed
*/
public
void
testPreRegisterPatientDuplicateEmail
()
throws
Exception
{
PatientBean
p2
=
new
PatientBean
();
p2
.
setFirstName
(
"Jiminy"
);
p2
.
setLastName
(
"Cricket"
);
p2
.
setEmail
(
"make.awish@gmail.com"
);
p2
.
setPassword
(
"password"
);
action
.
addPatient
(
p2
);
PatientBean
p3
=
new
PatientBean
();
p3
.
setFirstName
(
"Make"
);
p3
.
setLastName
(
"AWish"
);
p3
.
setEmail
(
"make.awish@gmail.com"
);
p3
.
setPassword
(
"password"
);
try
{
action
.
addPatient
(
p3
);
fail
(
"Duplicate email"
);
}
catch
(
ITrustException
e
)
{
}
}
/**
* Check that invalid names are not allowed
*/
public
void
testPreRegisterPatientInvalidName
()
throws
Exception
{
}
}
}
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