Unit/Integration Tests - Commerce 7,5

Vote:
 

Hi

Is there anybody who knows how I can initialize commerce 7,5 to get productentities within a test class?

Thanks in advance!

#79107
Dec 09, 2013 17:25
Vote:
 

To make your class testable you should make it dependent on the IContentRepository or IContentLoader (in contrast to using DataFactory). Then use your favorite mock frame work to mock the dependency and work with your test data in your unit test.

#79194
Dec 10, 2013 20:18
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.