All Versions
Latest Version
Avg Release Cycle
178 days
Latest Release
2266 days ago

Changelog History

  • v4.0.1

    April 19, 2016
  • v4.0.0

    April 19, 2016
  • v3.1.1

    April 19, 2016
  • v3.1.0

    July 13, 2015
  • v3.0.0 Changes

    January 29, 2015

    ๐Ÿ”‹ Features

    • ๐Ÿ‘ has and gimme functions now supports multiple templates

      Fixture.from(User.class).gimme(2, "male", "female");

      Fixture.of(User.class).addTemplate("valid", new Rule() {{ add("addresses", has(2).of(Address.class, "sp", "mg")); }});

    • โž• adding asString to instant function #58
      add("birthdayAsString", instant("18 years ago").asString("dd/MM/yyyy"));

    • uniqueRandom function to generate unique values #70

    • CNPJ function #55
      add("cnpj", cnpj());

    ๐Ÿ›  Bugfixes

    • ๐Ÿ›  Fixing range function with BigDecimal type #69
    • ๐Ÿ›  Fixing fixtures for inner classes with construtors in Java 8 935214c
    • ๐Ÿ›  Fixing overriding nested attribute in gimme call #73
    • And others...


    • ๐Ÿ“š Little improvements in documentation
    • ๐Ÿ”จ Functions' package was refactored, this will break people that are importing those functions
  • v2.2.0 Changes

    April 25, 2014

    ๐Ÿ”‹ Features

    • ๐Ÿ›  Fixtures can now define Processors that will run after object instantiation. We already provide a HibernateProcessor to load generated fixtures into database, making easy to create integration tests
      Fixture.from(User.class).uses(new HibernateProcessor(session)).gimme("valid"); //this will generate new User based on valid template and insert it to database through Hibernate
    • Now we have TemplateLoader interface that should be used to declare or templates.

      public class UserTemplateLoader implements TemplateLoader { @Override public void load() { Fixture.of(User.class).addTemplate("valid", new Rule() {{ add("name", random("Nykolas", "Anderson", "Arthur")); ... }}); } }

    ๐Ÿ”จ And to load declared templates, we have the new class FixtureFactoryLoader that loads all templates in declared package
    ๐Ÿ”จ FixtureFactoryLoader.loadTemplates("");

    • ๐Ÿ†• New random function to BigDecimal and BigInteger
      add("ammount", random(BigDecimal.class, new MathContext(2)));
    • ๐Ÿ‘Œ Support to override properties definitions on gimme call #41

      Client client = Fixture.from(User.class).gimme("valid", new Rule() {{ add("name", "New name only for this client"); }});

    ๐Ÿ›  Bugfixes

    • 0๏ธโƒฃ Prioritise default constructor and choose right constructor based on parameter name and type #32
    • ๐Ÿ›  Bugfix for attributes on inherited classes #35
    • Reset property on inherited template #38
    • Generate random values for short and byte #41
    • And others...
  • v2.1.0

    May 20, 2013