2015-04-15 18:32:56 +00:00
|
|
|
|
///
|
|
|
|
|
|
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
|
|
|
|
|
///
|
|
|
|
|
|
using System;
|
2015-02-19 07:37:37 +00:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
using log4net;
|
|
|
|
|
|
using TBF.BenchControl;
|
|
|
|
|
|
|
|
|
|
|
|
namespace TBF.BenchControl.TestMethods.PMaxTest
|
|
|
|
|
|
{
|
|
|
|
|
|
public class TestMethod : ComponentBase, GenericDevices.ITestMethod
|
|
|
|
|
|
{
|
|
|
|
|
|
private static readonly ILog log = LogManager.GetLogger(typeof(TestMethod));
|
|
|
|
|
|
public override string ToString() { return string.Format("TestMethods.PMaxTest({0})", Cfg.ToString(1)); }
|
|
|
|
|
|
|
|
|
|
|
|
readonly TestMethodCfg testMethodCfg;
|
|
|
|
|
|
|
2015-09-06 20:21:54 +00:00
|
|
|
|
public bool Evaluate(Entities.Test test) { return true; }
|
|
|
|
|
|
public bool Publish(Entities.Test test) { return true; }
|
2015-02-19 07:37:37 +00:00
|
|
|
|
public bool CanTest(Entities.MetersKind meters) { return true; }
|
|
|
|
|
|
|
2015-06-29 09:14:33 +00:00
|
|
|
|
public TestMethod()
|
|
|
|
|
|
{
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2015-02-19 07:37:37 +00:00
|
|
|
|
public TestMethod(TestMethodCfg cfg)
|
|
|
|
|
|
: base(cfg)
|
|
|
|
|
|
{
|
|
|
|
|
|
testMethodCfg = cfg;
|
|
|
|
|
|
log.Debug(this.ToString());
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public IList<Event> Execute(Entities.Test test)
|
|
|
|
|
|
{
|
|
|
|
|
|
return (new PMaxTestSeq()).Execute(test, testMethodCfg.TestParams);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|