Skip to content

tonivade/json-fixtures

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

json-fixtures

Json-Fixtures is a library to simplify tests. You can define fixtures using json and load inside your tests using annotations.

Supported types:

  • Pojos
  • Arrays of pojos
  • Collections of Pojos
    • List
    • Set
    • Collection
  • Maps of Pojos

Example

@Rule
public JsonFixturesTestRule rule = new JsonFixturesTestRule(this);

@JsonFixture("/files/data.json")
public Data data;

@JsonFixture("/files/list.json")
public List<Data> dataList;

@JsonFixture("/files/list.json")
public Set<Data> dataSet;

@JsonFixture("/files/list.json")
public Collection<Data> dataCollection;

@JsonFixture("/files/list.json")
public Data[] dataArray;

@JsonFixture("/files/map.json")
public Map<String, Data> dataMap;

Build Status

About

Simple json fixtures with test rules and annotations

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages