2018-09-10 08:06:31 +00:00
|
|
|
|
///
|
|
|
|
|
|
/// Copyright (c) 2018 Sensus Slovensko a.s.
|
|
|
|
|
|
///
|
|
|
|
|
|
using System;
|
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
using log4net;
|
2021-09-23 09:46:40 +00:00
|
|
|
|
using Common;
|
2018-09-10 08:06:31 +00:00
|
|
|
|
using Config.Entities;
|
2021-10-26 09:23:57 +00:00
|
|
|
|
using TBF.Rig;
|
2018-09-10 08:06:31 +00:00
|
|
|
|
|
2021-10-26 09:23:57 +00:00
|
|
|
|
namespace TBF.Rig.TestMethods.ChangeFlowDirection
|
2018-09-10 08:06:31 +00:00
|
|
|
|
{
|
|
|
|
|
|
public class TestMethod : ComponentBase, GenericDevices.ITestMethod
|
|
|
|
|
|
{
|
|
|
|
|
|
private static readonly ILog log = LogManager.GetLogger(typeof(TestMethod));
|
2021-04-07 07:57:42 +00:00
|
|
|
|
public override string ToString() { return string.Format("{0}({1})", ClassName, Cfg.ToString(-1)); }
|
2018-09-10 08:06:31 +00:00
|
|
|
|
|
|
|
|
|
|
public bool CanTest(MetersKind meters) { return meters == MetersKind.Single; }
|
|
|
|
|
|
public bool DoTransitions() { return true; }
|
|
|
|
|
|
|
2021-04-07 07:57:42 +00:00
|
|
|
|
public TestMethod() { }
|
2018-09-10 08:06:31 +00:00
|
|
|
|
|
|
|
|
|
|
public TestMethod(Generic.IComponentCfg cfg)
|
|
|
|
|
|
: base(cfg)
|
|
|
|
|
|
{
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2021-04-07 07:57:42 +00:00
|
|
|
|
public override void Initialize()
|
|
|
|
|
|
{
|
|
|
|
|
|
log.FatalFormat("{0} initialized: {1}", Name, this);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2018-09-10 08:06:31 +00:00
|
|
|
|
public IList<Event> Execute(Test test, int repetNr, bool isLastRepetition)
|
|
|
|
|
|
{
|
2018-09-18 13:25:31 +00:00
|
|
|
|
return (new ChangeFlowDirectionSeq()).Execute(test, repetNr, isLastRepetition, DebugLevel);
|
2018-09-10 08:06:31 +00:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|