Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Veil Veilig
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ASD-Project-S2-2023-klas-B
Veil Veilig
Commits
0d154da8
Commit
0d154da8
authored
1 year ago
by
Nigel Peperkamp
Browse files
Options
Downloads
Patches
Plain Diff
Small unittests fix
parent
6adf8a92
5 merge requests
!56
MR/ release-candidate to main
,
!54
MR/ development naar release-candidate
,
!53
MR/ MVP to development
,
!45
merging compiler into integration-mvp
,
!36
Added unittests to Checker class
Pipeline
#6816
passed with stages
in 37 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/test/java/nl/han/aim/asd/veilveilig/parser/CheckerUnitTest.java
+12
-3
12 additions, 3 deletions
...ava/nl/han/aim/asd/veilveilig/parser/CheckerUnitTest.java
with
12 additions
and
3 deletions
src/test/java/nl/han/aim/asd/veilveilig/parser/CheckerUnitTest.java
+
12
−
3
View file @
0d154da8
...
...
@@ -31,6 +31,7 @@ public class CheckerUnitTest {
// Act
pipeline
.
parser
(
input
);
AST
ast
=
pipeline
.
getAST
();
checker
.
check
(
ast
);
// Assert
Assertions
.
assertTrue
(
ast
.
getErrors
().
isEmpty
());
...
...
@@ -44,6 +45,7 @@ public class CheckerUnitTest {
// Act
pipeline
.
parser
(
input
);
AST
ast
=
pipeline
.
getAST
();
checker
.
check
(
ast
);
// Assert
Assertions
.
assertTrue
(
ast
.
getErrors
().
isEmpty
());
...
...
@@ -57,6 +59,7 @@ public class CheckerUnitTest {
// Act
pipeline
.
parser
(
input
);
AST
ast
=
pipeline
.
getAST
();
checker
.
check
(
ast
);
// Assert
Assertions
.
assertTrue
(
ast
.
getErrors
().
isEmpty
());
...
...
@@ -71,6 +74,7 @@ public class CheckerUnitTest {
// Act
pipeline
.
parser
(
input
);
AST
ast
=
pipeline
.
getAST
();
checker
.
check
(
ast
);
// Assert
Assertions
.
assertTrue
(
ast
.
getErrors
().
isEmpty
());
...
...
@@ -79,11 +83,12 @@ public class CheckerUnitTest {
@Test
public
void
checkOnCorrectInputLevelFour
()
throws
IOException
{
// Arrange
String
input
=
"Bied in de eerste
vijf
rondes tot €500 in stappen van €100."
;
String
input
=
"Bied in de eerste
5
rondes tot €500 in stappen van €100."
;
// Act
pipeline
.
parser
(
input
);
AST
ast
=
pipeline
.
getAST
();
checker
.
check
(
ast
);
// Assert
Assertions
.
assertTrue
(
ast
.
getErrors
().
isEmpty
());
...
...
@@ -98,6 +103,7 @@ public class CheckerUnitTest {
// Act
pipeline
.
parser
(
input
);
AST
ast
=
pipeline
.
getAST
();
checker
.
check
(
ast
);
// Assert
Assertions
.
assertTrue
(
ast
.
getErrors
().
isEmpty
());
...
...
@@ -112,6 +118,7 @@ public class CheckerUnitTest {
// Act
pipeline
.
parser
(
input
);
AST
ast
=
pipeline
.
getAST
();
checker
.
check
(
ast
);
// Assert
Assertions
.
assertTrue
(
ast
.
getErrors
().
isEmpty
());
...
...
@@ -126,6 +133,7 @@ public class CheckerUnitTest {
// Act
pipeline
.
parser
(
input
);
AST
ast
=
pipeline
.
getAST
();
checker
.
check
(
ast
);
// Assert
Assertions
.
assertTrue
(
ast
.
getErrors
().
isEmpty
());
...
...
@@ -141,6 +149,7 @@ public class CheckerUnitTest {
// Act
pipeline
.
parser
(
input
);
AST
ast
=
pipeline
.
getAST
();
checker
.
check
(
ast
);
// Assert
Assertions
.
assertTrue
(
ast
.
getErrors
().
isEmpty
());
...
...
@@ -171,6 +180,7 @@ public class CheckerUnitTest {
// Act
pipeline
.
parser
(
input
);
AST
ast
=
pipeline
.
getAST
();
checker
.
check
(
ast
);
// Assert
Assertions
.
assertTrue
(
ast
.
getErrors
().
isEmpty
());
...
...
@@ -189,6 +199,7 @@ public class CheckerUnitTest {
// Act
pipeline
.
parser
(
input
);
AST
ast
=
pipeline
.
getAST
();
checker
.
check
(
ast
);
// Assert
Assertions
.
assertTrue
(
ast
.
getErrors
().
isEmpty
());
...
...
@@ -222,8 +233,6 @@ public class CheckerUnitTest {
AST
ast
=
pipeline
.
getAST
();
checker
.
check
(
ast
);
System
.
out
.
println
(
ast
.
getErrors
());
// Assert
Assertions
.
assertEquals
(
error
,
ast
.
getErrors
().
get
(
0
).
description
);
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
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