[InlineData(null)] // null public async void ReturnExpectedIdentifier(string staticIdentifier) { var strategy = new StaticStrategy(staticIdentifier); var identifier = await strategy.GetIdentifierAsync(new Object()); Assert.Equal(staticIdentifier, identifier); }
public static Logger LoggerFactory(string name, LogStrategy strategy = LogStrategy.STATIC) { ILogStrategy _strategy; switch (strategy) { case LogStrategy.STATIC: _strategy = new StaticStrategy(); break; case LogStrategy.HTTP_API: _strategy = new APIStrategy(); break; case LogStrategy.FILE: _strategy = new FileStrategy(); break; default: throw new Exception("Invalid Log Strategy!!"); break; } return(new Logger(name, _strategy)); }
public void HavePriorityNeg1000() { var strategy = new StaticStrategy(""); Assert.Equal(-1000, strategy.Priority); }
static void Main(string[] args) { DynamicStrategy.Run(); StaticStrategy.Run(); }