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 more tests for entities #863

Merged
merged 18 commits into from Mar 20, 2018

Conversation

Projects
None yet
3 participants
@Pr0methean
Contributor

Pr0methean commented Mar 11, 2018

This PR creates a parallel class hierarchy of tests for GlowEntity descendants in net.glowstone.entity with no subpackage, and in net.glowstone.entity.passive. In general:

  • For each class E extends F where F extends GlowEntity, there is a test class called ETest that extends FTest.
  • When E is concrete, so is ETest.
  • When E is abstract or effectively abstract, ETest is abstract and generic, and its declaration is ETest<T extends E> extends FTest<T>.
  • ETest inherits testCreateSpawnMessage from GlowEntityTest (currently the only test method in that class).

I believe GlowAgeableTest and GlowBatTest are the only classes that add new non-stub test methods; this PR's main purpose is to apply existing and future test cases to more of the entity classes they are applicable to. However, this PR still increases the line coverage of net.glowstone.entity.passive to 36%.

After this PR is merged, similar test classes will be added to net.glowstone.entity.monster, objects and projectile (which are all the other subpackages that contain entity classes).

@Pr0methean Pr0methean requested a review from momothereal Mar 11, 2018

@Pr0methean Pr0methean requested a review from mastercoms Mar 11, 2018

Pr0methean added some commits Mar 11, 2018

@Pr0methean Pr0methean force-pushed the Pr0methean:testAllTheEntities2 branch from b518be8 to 065cd56 Mar 11, 2018

@Pr0methean Pr0methean force-pushed the Pr0methean:testAllTheEntities2 branch from 58f0ae0 to 10e4e15 Mar 11, 2018

Pr0methean and others added some commits Mar 17, 2018

Merge remote-tracking branch 'refs/remotes/GlowstoneMC/dev' into test…
…AllTheEntities2

# Conflicts:
#	.circleci/config.yml
@mastercoms

Looks good, but some of the files don't have new lines. Could you please fix that?

@Pr0methean

This comment has been minimized.

Contributor

Pr0methean commented Mar 20, 2018

Should be fixed in e30588f.

@mastercoms mastercoms merged commit 841f15d into GlowstoneMC:dev Mar 20, 2018

2 checks passed

ci/circleci: build Your tests passed on CircleCI!
Details
license/cla Contributor License Agreement is signed.
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment