Everything works OK after serious changes:
- all components, componentCfg-s and parameter providers use base classes - less boilerplate code, simpler access to test/procedure parameters from code - CreateTestParams(test), CreateProcedureParams(procedure) methods added - TestBenchSim class is made static, it is not inheritted by any device anymore
This commit is contained in:
@@ -1,29 +1,27 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using log4net;
|
||||
using TBF.BenchControl;
|
||||
using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.TestMethods.CombinedWithDetection
|
||||
{
|
||||
public class TestMethod : Generic.IComponent, GenericDevices.ITestMethod, ISequence
|
||||
public class TestMethod : ComponentBase, GenericDevices.ITestMethod, ISequence
|
||||
{
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(TestMethod));
|
||||
public override string ToString() { return string.Format("TestMethods.CombinedWithDetection({0})", Cfg.ToString(1)); }
|
||||
|
||||
readonly TestMethodCfg testMethodCfg;
|
||||
public Generic.IComponentCfg Cfg { get { return testMethodCfg; } }
|
||||
|
||||
public static void ResetStaticProperties() { }
|
||||
|
||||
public string Name { get { return testMethodCfg.Name; } }
|
||||
|
||||
public TestMethod(TestMethodCfg cfg)
|
||||
: base(cfg)
|
||||
{
|
||||
if (cfg == null) throw new ArgumentNullException("cfg");
|
||||
this.testMethodCfg = cfg;
|
||||
testMethodCfg = cfg;
|
||||
log.Debug(this.ToString());
|
||||
}
|
||||
|
||||
public IList<Event> Execute(Entities.Test test)
|
||||
{
|
||||
IParamsProvider testParams = BenchControl.TbfComponents.GetTestParams(this, test);
|
||||
return (new CombinedWithDetectionSeq()).Execute(test, testParams as CombinedWithDetTestParams);
|
||||
return (new CombinedWithDetectionSeq()).Execute(test, testMethodCfg.TestParams);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user