Unit Testing Umbraco 8 with Our.Umbraco.Community.Tests
I'm having issues trying to use the Umbraco unit tests to base my tests on. If I try to inherit from one of the base tests, e.g. Umbraco.Tests.Testing.UmbracoTestBase, I get the following exception:
System.TypeLoadException: 'Could not load type 'MyLibrary.Umbraco8Source.Tests.MyTest' from assembly 'Umbraco.Tests, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.'
But still no joy. Now in v7 you have to ensure that the test was in namespace Umbraco.Tests because alot of umbraco internals had been marked as visible to Umbraco.Tests however in v8 does not look like that is the case.
Unit Testing Umbraco 8 with Our.Umbraco.Community.Tests
I'm having issues trying to use the Umbraco unit tests to base my tests on. If I try to inherit from one of the base tests, e.g. Umbraco.Tests.Testing.UmbracoTestBase, I get the following exception:
System.TypeLoadException: 'Could not load type 'MyLibrary.Umbraco8Source.Tests.MyTest' from assembly 'Umbraco.Tests, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.'
It looks like this is because of the line:
in UmbracoTestBase.Setup() that tries to load the test class from within the current Assembly (Umbraco.Tests)
It doesn't look like we can inherit from any of the V8 tests; is there any way to do this?
Euan,
I just got that, I did try decorating my test class with
But still no joy. Now in v7 you have to ensure that the test was in namespace Umbraco.Tests because alot of umbraco internals had been marked as visible to Umbraco.Tests however in v8 does not look like that is the case.
Regards
Ismail
is working on a reply...