All Projects → OpenPojo → Openpojo

OpenPojo / Openpojo

Licence: apache-2.0
POJO Testing & Identity Management Made Trivial

Programming Languages

java
68154 projects - #9 most used programming language

Labels

Projects that are alternatives of or similar to Openpojo

Opencover
A code coverage tool for .NET 2 and above (WINDOWS OS only), support for 32 and 64 processes with both branch and sequence points
Stars: ✭ 1,256 (+929.51%)
Mutual labels:  coverage
Sequana
Sequana: a set of Snakemake NGS pipelines
Stars: ✭ 100 (-18.03%)
Mutual labels:  coverage
Bashcov
Code coverage tool for Bash
Stars: ✭ 113 (-7.38%)
Mutual labels:  coverage
Swagger Coverage
Tool which generates full picture of coverage of API tests based on OAS 2 (Swagger)
Stars: ✭ 89 (-27.05%)
Mutual labels:  coverage
Codacy Coverage Reporter
Multi-language coverage reporter for Codacy
Stars: ✭ 96 (-21.31%)
Mutual labels:  coverage
Awesome Open Hardware Verification
A List of Free and Open Source Hardware Verification Tools and Frameworks
Stars: ✭ 103 (-15.57%)
Mutual labels:  coverage
React Base
atSistemas React/Redux Isomorphic Platform
Stars: ✭ 82 (-32.79%)
Mutual labels:  coverage
Jacoco Plugin
Jenkins JaCoCo Plugin
Stars: ✭ 119 (-2.46%)
Mutual labels:  coverage
Rain
🌧️ A live example to illustrate python packaging, testing, building, & deploying
Stars: ✭ 99 (-18.85%)
Mutual labels:  coverage
Teaspoon
Teaspoon: Javascript test runner for Rails. Use Selenium, BrowserStack, or PhantomJS.
Stars: ✭ 1,443 (+1082.79%)
Mutual labels:  coverage
Ddd Tdd Rich Domain Model Dojo Kata
DDD patterns implemented following TDD
Stars: ✭ 91 (-25.41%)
Mutual labels:  coverage
Courtney
Courtney is a coverage tool for Go
Stars: ✭ 92 (-24.59%)
Mutual labels:  coverage
Coverage.vim
code coverage vim plugin
Stars: ✭ 106 (-13.11%)
Mutual labels:  coverage
Karma Webpack Example
Karma + Webpack + Mocha + Chai + Istanbul
Stars: ✭ 88 (-27.87%)
Mutual labels:  coverage
Coveralls Ruby
Coveralls for Ruby
Stars: ✭ 115 (-5.74%)
Mutual labels:  coverage
Dspot
Automatically detect and generate missing assertions for Junit test cases (also known as test amplification)
Stars: ✭ 83 (-31.97%)
Mutual labels:  coverage
S2e
S2E: A platform for multi-path program analysis with selective symbolic execution.
Stars: ✭ 102 (-16.39%)
Mutual labels:  coverage
Example Swift
Codecov: Swift coverage example
Stars: ✭ 121 (-0.82%)
Mutual labels:  coverage
Sbt Jacoco
JaCoCo Code Coverage plug-in for sbt.
Stars: ✭ 115 (-5.74%)
Mutual labels:  coverage
Infection
PHP Mutation Testing library
Stars: ✭ 1,575 (+1190.98%)
Mutual labels:  coverage

OpenPojo Build Status Coverage Status Maven Central

POJO Testing & Identity Management Made Trivial

Maven Group Plugin Latest Version
com.openpojo.openpojo 0.8.13
com.googlecode.openpojo.openpojo 0.6.5 - Deprecated

Testing Example

public class PojoTest {
  // Configured for expectation, so we know when a class gets added or removed.
  private static final int EXPECTED_CLASS_COUNT = 1;

  // The package to test
  private static final String POJO_PACKAGE = "com.openpojo.sample";

  @Test
  public void ensureExpectedPojoCount() {
    List <PojoClass> pojoClasses = PojoClassFactory.getPojoClasses(POJO_PACKAGE,
                                                                   new FilterPackageInfo());
    Affirm.affirmEquals("Classes added / removed?", EXPECTED_CLASS_COUNT, pojoClasses.size());
  }

  @Test
  public void testPojoStructureAndBehavior() {
    Validator validator = ValidatorBuilder.create()
                            // Add Rules to validate structure for POJO_PACKAGE
                            // See com.openpojo.validation.rule.impl for more ...
                            .with(new GetterMustExistRule())
                            .with(new SetterMustExistRule())
                            // Add Testers to validate behaviour for POJO_PACKAGE
                            // See com.openpojo.validation.test.impl for more ...
                            .with(new SetterTester())
                            .with(new GetterTester())
                            .build();

    validator.validate(POJO_PACKAGE, new FilterPackageInfo());
  }
}

Identity Management Example

public class Person {
  @BusinessKey(caseSensitive = false)  //Configure your field(s)
  private String lastName;

  @Override
  public boolean equals(Object obj) {
    return BusinessIdentity.areEqual(this, obj);
  }

  @Override
  public int hashCode() {
    return BusinessIdentity.getHashCode(this);
  }

  @Override
  public String toString() {
      return BusinessIdentity.toString(this);
  }
}

For more examples and the tutorials see the Wiki

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].