Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tests for "changed" flag #5640

Merged
merged 1 commit into from
Nov 28, 2019
Merged

Conversation

koppor
Copy link
Member

@koppor koppor commented Nov 18, 2019

Update Do not change any functionality, but add tests.

Add tests for changed

  • Add tests
  • Guard AtomicFileWriter with a try-with-resources during save
  • use Objects.requireNonNull in DefaultFileUpdateMontitor
  • add comment
  • some auto-formattings
  • Fix typo in comment

(Follow-up to #5635)


  • Tests created for changes

@koppor koppor force-pushed the ensure-no-changes-after-writing branch 2 times, most recently from 509e9d6 to 482e4a1 Compare November 19, 2019 00:07
@koppor koppor added the status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers label Nov 19, 2019
@koppor koppor added status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers and removed status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers labels Nov 19, 2019
@koppor koppor changed the title After a UI-triggered save, no entry is flagged as changed [WIP] After a UI-triggered save, no entry is flagged as changed Nov 20, 2019
@koppor koppor force-pushed the ensure-no-changes-after-writing branch 2 times, most recently from eaa9e71 to b5ac16a Compare November 21, 2019 21:35
@koppor
Copy link
Member Author

koppor commented Nov 21, 2019

Thank you for the feedback --> Update: This PR not change any functionality, but add tests. - I changed the PR description accordingly.

@koppor koppor added the status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers label Nov 21, 2019
@koppor koppor changed the title [WIP] After a UI-triggered save, no entry is flagged as changed Add tests for "changed" flag Nov 21, 2019
build.gradle Outdated Show resolved Hide resolved
// modify entry
entry.setField(StandardField.AUTHOR, "BlaBla");

BibDatabaseContext context = new BibDatabaseContext(firstParse.getDatabase(), firstParse.getMetaData(),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only write entry once? Makes the test more straightforward

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test documents that the databaseWriter does not set/reset flags and stores the new entry format during writing. Thus, I renamed to ...EvenInThePrecenseOfSavedModifications

@koppor koppor mentioned this pull request Nov 24, 2019
5 tasks
@koppor koppor force-pushed the ensure-no-changes-after-writing branch 3 times, most recently from 8ea1da3 to 3c7a0a2 Compare November 26, 2019 23:50
- Add tests
- Guard AtomicFileWriter with a try-with-resources during save
- use Objects.requireNonNull in DefaultFileUpdateMontitor
- add comment
- some auto-formattings
- Fix typo in comment
@koppor koppor force-pushed the ensure-no-changes-after-writing branch from 3c7a0a2 to c900236 Compare November 26, 2019 23:51
@koppor
Copy link
Member Author

koppor commented Nov 27, 2019

All requested changes should now be included.

@koppor koppor merged commit 382c4b2 into master Nov 28, 2019
@koppor koppor deleted the ensure-no-changes-after-writing branch November 28, 2019 06:54
@koppor koppor removed the status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers label Nov 28, 2019
koppor pushed a commit that referenced this pull request Oct 15, 2021
3a6a0a7 Update masarykova-univerzita-pravnicka-fakulta.csl (#5655)
136653a Corrections for Conservation Biology style (#5661)
af148f8 Update biophysics-and-physicobiology.csl (#5646)
8842ed1 Create production-and-operations-management.csl (#5654)
6b4965f update style file (#5656)
e5f6066 Update to Ruby 3.0.2 (#5657)
61c530c Reindent/reorder (#5653)
118c217 Update gems (#5652)
46cd9ab harvard-university-of-bath.csl: correct et-al-min (#5651)
37ba705 Create focaal-journal-of-global-and-historical-anthropology.csl (#5649)
e22b8a5 Create developmental-medicine-and-child-neurology.csl (#5644)
f7bc32c Bump nokogiri from 1.11.4 to 1.12.5 (#5640)

git-subtree-dir: buildres/csl/csl-styles
git-subtree-split: 3a6a0a7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants