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

support empty datasets #32

Closed
rmpestano opened this issue Aug 21, 2016 · 0 comments
Closed

support empty datasets #32

rmpestano opened this issue Aug 21, 2016 · 0 comments

Comments

@rmpestano
Copy link
Owner

rmpestano commented Aug 21, 2016

Currently empty datasets are not supported.They are extremely useful for dataset comparison where e.g you expect an empty table after rows where deleted in test:

empty.yml

user:

follower:

tweet:

user.yml

user:
  - id: 1
    name: "@realpestano"
  - id: 2
    name: "@dbunit"

the test:

    @Test
    @DataSet(value = "yml/user.yml", disableConstraints = true)
    @ExpectedDataSet(value = "yml/empty.yml")
    public void shouldMatchEmptyYmlDataSet() {
        tx().begin();
        em().remove(em().find(User.class,1L));
        em().remove(em().find(User.class,2L));
        tx().commit();
    }

@rmpestano rmpestano changed the title support empty tables support empty datasets Aug 21, 2016
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

No branches or pull requests

1 participant