c# - Call test methods in the base class in .NET -


I have the EntityServiceBaseTestClass which is normal and there are general tests in it, however, as soon as I inherit the class in my special testing domain I do not run tests. But, if I keep my test test class in base assembly class as a base test class, then it works. Yes, Visual Studio may be in separate assembly to run base class test. For example:

  ** namespace bla bla ... domain. Test ** [Test class] Public category EntityServiceBaseTestClass & lt; TDomainEntity, TKey & gt; Where TDomainEntity: DomainEntityBase & lt; TDomainEntity, TKey & gt; Where Vaccine: Equitable & lt; Vaccines & gt; {{TestMethod} Public Zero CanSaveAddressMustUpdate () {// do generic tests}} ** namespace bla bla ... Domain.Customers.Tests ** {[TestClass] Public Class Customer Serving: EntityServiceBaseTestClass & lt; Address, Guid & gt; {Some specific domain tests}}  

If the code is not in the same assembly, then CanSaveAddressMustUpdate () is not getting the call.

The explanation I found here for the ban:

"A test class can inherit the statutes from another test class in the same assembly. That you can create test methods in a Base Test class and then use those methods in the test sections generated "

Since the binding document is Microsoft, I think you have an alternative Madhan will have no chance.

What you can do to change your test framework, everything is working like a magic with the nunit (tested with a recurrent test runner.)


Comments