Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
BudgetMaster
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
Model registry
Operate
Environments
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
Robert Goldmann
BudgetMaster
Commits
d228440a
Commit
d228440a
authored
4 years ago
by
Robert Goldmann
Browse files
Options
Downloads
Patches
Plain Diff
#598 - fixed unit tests
parent
de814147
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/test/java/de/deadlocker8/budgetmaster/unit/database/DatabaseParser_v5Test.java
+13
-6
13 additions, 6 deletions
...er8/budgetmaster/unit/database/DatabaseParser_v5Test.java
with
13 additions
and
6 deletions
src/test/java/de/deadlocker8/budgetmaster/unit/database/DatabaseParser_v5Test.java
+
13
−
6
View file @
d228440a
...
...
@@ -205,7 +205,9 @@ public class DatabaseParser_v5Test
Transaction
normalTransaction_1
=
new
Transaction
();
normalTransaction_1
.
setAmount
(
35000
);
normalTransaction_1
.
setDate
(
DateTime
.
parse
(
"2018-03-13"
,
DateTimeFormat
.
forPattern
(
"yyyy-MM-dd"
)));
DateTime
normalTransactionDate
=
DateTime
.
parse
(
"2018-03-13"
,
DateTimeFormat
.
forPattern
(
"yyyy-MM-dd"
));
normalTransactionDate
=
normalTransactionDate
.
withHourOfDay
(
12
).
withMinuteOfHour
(
0
).
withSecondOfMinute
(
0
);
normalTransaction_1
.
setDate
(
normalTransactionDate
);
normalTransaction_1
.
setCategory
(
categoryNone
);
normalTransaction_1
.
setName
(
"Income"
);
normalTransaction_1
.
setDescription
(
"Lorem Ipsum"
);
...
...
@@ -215,7 +217,9 @@ public class DatabaseParser_v5Test
Transaction
normalTransaction_2
=
new
Transaction
();
normalTransaction_2
.
setAmount
(-
2000
);
normalTransaction_2
.
setDate
(
DateTime
.
parse
(
"2018-06-15"
,
DateTimeFormat
.
forPattern
(
"yyyy-MM-dd"
)));
DateTime
normalTransaction_2Date
=
DateTime
.
parse
(
"2018-06-15"
,
DateTimeFormat
.
forPattern
(
"yyyy-MM-dd"
));
normalTransaction_2Date
=
normalTransaction_2Date
.
withHourOfDay
(
12
).
withMinuteOfHour
(
0
).
withSecondOfMinute
(
0
);
normalTransaction_2
.
setDate
(
normalTransaction_2Date
);
normalTransaction_2
.
setName
(
"Simple"
);
normalTransaction_2
.
setDescription
(
""
);
normalTransaction_2
.
setAccount
(
account2
);
...
...
@@ -230,15 +234,16 @@ public class DatabaseParser_v5Test
Transaction
repeatingTransaction_1
=
new
Transaction
();
repeatingTransaction_1
.
setAmount
(-
12300
);
DateTime
repeatingTransactionDate_1
=
DateTime
.
parse
(
"2018-03-13"
,
DateTimeFormat
.
forPattern
(
"yyyy-MM-dd"
));
repeatingTransaction_1
.
setDate
(
repeatingTransactionDate_1
);
DateTime
repeatingTransaction_1Date
=
DateTime
.
parse
(
"2018-03-13"
,
DateTimeFormat
.
forPattern
(
"yyyy-MM-dd"
));
repeatingTransaction_1Date
=
repeatingTransaction_1Date
.
withHourOfDay
(
12
).
withMinuteOfHour
(
0
).
withSecondOfMinute
(
0
);
repeatingTransaction_1
.
setDate
(
repeatingTransaction_1Date
);
repeatingTransaction_1
.
setCategory
(
categoryNone
);
repeatingTransaction_1
.
setName
(
"Test"
);
repeatingTransaction_1
.
setDescription
(
""
);
repeatingTransaction_1
.
setAccount
(
account1
);
RepeatingOption
repeatingOption_1
=
new
RepeatingOption
();
repeatingOption_1
.
setModifier
(
new
RepeatingModifierDays
(
10
));
repeatingOption_1
.
setStartDate
(
repeatingTransactionDate
_1
);
repeatingOption_1
.
setStartDate
(
repeatingTransaction
_1
Date
);
repeatingOption_1
.
setEndOption
(
new
RepeatingEndAfterXTimes
(
2
));
repeatingTransaction_1
.
setRepeatingOption
(
repeatingOption_1
);
repeatingTransaction_1
.
setTags
(
new
ArrayList
<>());
...
...
@@ -246,7 +251,9 @@ public class DatabaseParser_v5Test
Transaction
transferTransaction
=
new
Transaction
();
transferTransaction
.
setAmount
(-
250
);
transferTransaction
.
setDate
(
DateTime
.
parse
(
"2018-06-15"
,
DateTimeFormat
.
forPattern
(
"yyyy-MM-dd"
)));
DateTime
transferTransactionDate
=
DateTime
.
parse
(
"2018-06-15"
,
DateTimeFormat
.
forPattern
(
"yyyy-MM-dd"
));
transferTransactionDate
=
transferTransactionDate
.
withHourOfDay
(
12
).
withMinuteOfHour
(
0
).
withSecondOfMinute
(
0
);
transferTransaction
.
setDate
(
transferTransactionDate
);
transferTransaction
.
setName
(
"Transfer"
);
transferTransaction
.
setDescription
(
""
);
transferTransaction
.
setAccount
(
account2
);
...
...
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