tbf/TestBenchFramework/BenchControl/TestMethods/iPerlCommunication/TestMethodCfg.cs

49 lines
1.3 KiB
C#

///
/// Copyright (c) 2015 Sensus Metering Systems
/// Author: Milan Hanajík
///
using System;
using System.Collections.Generic;
using System.IO;
using System.Xml.Serialization;
using TBF.BenchControl.Generic;
namespace TBF.BenchControl.TestMethods.iPerlCommunication
{
public class TestMethodCfg : ComponentCfgBase, Generic.IComponentCfg
{
public IComponent GetComponent(IList<IComponent> components) { return new TestMethod(this); }
public IComponentCfgCtrl GetControl() { return new TestMethodCfgCtrl(); }
/// <summary> Test parameters </summary>
[XmlIgnore]
public iPerlCommunicationParams TestParams;
public override IParamsProvider GetTestParams() { return TestParams; }
public override IParamsProvider CreateTestParams(Entities.Test test)
{
iPerlCommunicationParams testParams = new iPerlCommunicationParams();
testParams.UpdateTestParams(Name, test);
return testParams;
}
/// Private parameterless constructor invoked by all other (public) constructors
TestMethodCfg()
{
Name = "iPerlCommunication";
ParentName = string.Empty;
TestParams = new iPerlCommunicationParams();
}
public TestMethodCfg(IComponentFactory factory)
: this()
{
this.Factory = factory;
}
public string ToString(int i)
{
return string.Format("Name={0}", Name);
}
}
}