This question is locked. New answers and comments are not allowed.
Hello,
I'm trying to make a class inherit for the BaseWebAiiTest class.
I've have a GlobalFunc.cs file where i store all my methods that can be used for everything, like LogMessage etc.
And i don't wanna make a new GlobalFunc each time. So i made a new class. Procedure that inherits from BaseWebAiiTest
In one of my currect tests called CreateChartOfAccounts that inherits from Procedure (Procedure inherits from BaseWebAiiTest)
But when i'm doing this all of my steps dissappear and i get a error when i try to run.
Error message :
System.ArgumentException: String cannot have zero length.
Is it possible to inherit from in my case Procedure? Or how shall i solve this?
[EDIT : Added attached files]
Best Regards
//Jonas
I'm trying to make a class inherit for the BaseWebAiiTest class.
I've have a GlobalFunc.cs file where i store all my methods that can be used for everything, like LogMessage etc.
And i don't wanna make a new GlobalFunc each time. So i made a new class. Procedure that inherits from BaseWebAiiTest
public class Procedure : BaseWebAiiTest
{
protected Lazy<GlobalFunc> globalFunc;
public Procedure()
{
globalFunc = new Lazy<GlobalFunc>(CreateGlobalFunc);
}
private GlobalFunc CreateGlobalFunc()
{
return new GlobalFunc(Log);
}
}
In one of my currect tests called CreateChartOfAccounts that inherits from Procedure (Procedure inherits from BaseWebAiiTest)
But when i'm doing this all of my steps dissappear and i get a error when i try to run.
public class CreateChartOfAccounts : Procedure
{
[CodedStep("Test Monkey")]
public void Monkey_test()
{
globalFunc.Value.LogMessage("Hello world");
}
Error message :
System.ArgumentException: String cannot have zero length.
Is it possible to inherit from in my case Procedure? Or how shall i solve this?
[EDIT : Added attached files]
Best Regards
//Jonas