Rank: Advanced Member
Groups: HelpDesk, Developers Joined: 11/9/2018(UTC) Posts: 564
Thanks: 122 times Was thanked: 26 time(s) in 25 post(s)
|
I've created a unit test class to test some functionality in another class library I've built. I've added references to CommerceBuilder, Windsor and nHibernate. I can instantiate Able class objects. When I try to call a method in the other class library that instantiates a repository (OrderItemRepository), I'm getting exceptions about log4net.config not being found.
How do I set up a unit test that can involve CB classes? Is there some sort of bootstrap I need to call from the unit test?
|
|
|
|
Rank: Advanced Member
Groups: HelpDesk, Developers Joined: 11/9/2018(UTC) Posts: 564
Thanks: 122 times Was thanked: 26 time(s) in 25 post(s)
|
I really need some help with setting up unit tests.
I even tried setting one up inside the CommerceBuilder class, I get an exception that database configuration has not been set thrown by DatabaseConfiguration class.
Suggestions?
|
|
|
|
Rank: Administration
Groups: Admin, Administrators, HelpDesk, System, Authorized User, Developers, Registered Joined: 10/5/2018(UTC) Posts: 175
Thanks: 8 times Was thanked: 17 time(s) in 15 post(s)
|
Hi, just copy/past log4net config file from your App_Data into Bin/Debug or Bin/Release folder of your Unit test project depending upon your build configuration. Log4net will probs the Bin directory to find the configurations so that should fix it. Edited by user Thursday, November 7, 2019 5:26:53 AM(UTC)
| Reason: Not specified
|
|
|
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.
Important Information:
The AbleCommerce Forums uses cookies. By continuing to browse this site, you are agreeing to our use of cookies.
More Details
Close