Page 1 of 1

Unit tests for heat-clinic

Posted: Thu Aug 09, 2012 7:17 am
by dilupa.m
Ive read through extending entities and services in the broadleaf wiki. It suggests that these services are meant to be added to the core module since those are shared between admin and site. Is it possible for the team to add necessary configurations to the core module in the demo site for us to get a jump start on testing the our modifications by following guide in the wiki. A few pointers to setup the necessary application-context files and persistence units for testing would be great. :)

Re: Unit tests for heat-clinic

Posted: Thu Aug 09, 2012 9:23 am
by aazzolini
Added this to our backlog, but there's quite a bit of stuff ahead of it unfortunately.

However, it should be pretty easy for you to figure it out.

We use a fully set up Spring testing harness in our integration project: https://github.com/BroadleafCommerce/Br ... ntegration

Alternatively, if you don't want to set up a separate maven module for integration tests, you can also do it in the core project. Lucky for you, we have an example of that too! https://github.com/BroadleafCommerce/bl ... ee/develop

Let me know if you need help and I can give you a few pointers since it will be a while before we write official documentation.

----------

Edit: I should also note that we use two types of tests, simple unit tests and tests that require a Spring context. You can find example of simple unit tests here: (note that we use junit and easy mock for our unit tests)

https://github.com/BroadleafCommerce/Br ... ommon/time