I have the following problem. I have some unit tests implemented in someone else's assebly, which I refer to in my unit test project. Unit tests are implemented as abstract classes and must be inherited (and "activated" with it) in my unit test project.
When I inherit these classes in my project, the testing methods are visible to me. But for some reason they are not managed by Visual Studio. When I run tests with Galio Icarus, I see a message in which "Test ... cannot be found."
When I copy abstract test classes to my project, the tests are detected and run properly.
Do you know if there are any restrictions for methods that perform unit tests? It seems to me that the test execution has logic that not only searches for TestClassAttribute, TestMethodAttribute and so on, but also checks if the test implementation is running in the same assembly.
The implementation is as follows:
abstract class with test implementation in foreign assebly:
[TestClass] public abstract class GeneralGridTestsBase<T> where T : GridParamsBase, new() { [TestMethod] public virtual void GetCellSetItems_Unique_CellSetKeys() {
In my test project, I inherit an abstract class and expect the tests to be visible and βactiveβ.
[TestClass] public class RetailInputGeneralTests : GeneralGridTestsBase<RetailInputParams> { }
source share