tbf/TestBenchFramework/BenchControl/TestMethods/LeakTest/TestMethodFactory.cs

27 lines
894 B
C#
Raw Normal View History

///
/// Copyright (c) 2013-2016 Sensus Metering Systems
///
using System.Collections.Generic;
using TBF.BenchControl.Generic;
namespace TBF.BenchControl.TestMethods.LeakTest
{
public class TestMethodFactory : IComponentFactory
{
2016-09-26 09:08:16 +00:00
public string ClassName { get { return this.GetType().Namespace.Substring(17); } }
public void ResetStaticProperties() { TestMethod.ResetStaticProperties(); }
public IComponent DummyComponent() { return new TestMethod(); }
public IComponent GetComponent(IComponentCfg cfg, IList<IComponent> components) { return new TestMethod(cfg); }
2016-09-26 09:08:16 +00:00
public IComponentCfg DefaultConfig() { return new TestMethodCfg(this.GetType().Namespace.Substring(29), this); }
public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component)
{
return ComponentCfgBase.CreateFromDbEntity(typeof(TestMethodCfg), component, this);
}
}
}