Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
T
Threads_Homework
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ali.saeed
Threads_Homework
Commits
f80017f9
Commit
f80017f9
authored
Oct 29, 2023
by
Ali Saeed
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Create PrimeNumbersServiceTest Class
parent
12258114
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
0 deletions
+22
-0
PrimeNumbersServiceTest.java
src/test/java/org/example/PrimeNumbersServiceTest.java
+22
-0
No files found.
src/test/java/org/example/PrimeNumbersServiceTest.java
0 → 100644
View file @
f80017f9
package
org
.
example
;
import
junit.framework.TestCase
;
import
org.junit.Test
;
import
java.util.Arrays
;
import
java.util.List
;
public
class
PrimeNumbersServiceTest
extends
TestCase
{
@Test
public
void
testThreeIsPrime
(){
PrimeNumbersService
test
=
new
PrimeNumbersService
();
assertTrue
(
test
.
isPrimeNumber
(
3
));
}
@Test
public
void
testFindPrimeNumbersFromOneToTen
(){
PrimeNumbersService
test
=
new
PrimeNumbersService
(
0
,
10
);
List
<
Integer
>
expected
=
Arrays
.
asList
(
2
,
3
,
5
,
7
);
assertEquals
(
expected
,
test
.
findPrimeNumbers
());
}
}
\ No newline at end of file
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