public static object FuturesPreviousCode( [ExcelArgument(Description = "Futures code, e.g. CLZ3")] string FuturesCode) { return(ExcelHelper.Execute(_logger, () => { var c = new FutureCode(FuturesCode, DateTime.Today.Year - 2, ContainerStores.SessionContainer.GetService <IFutureSettingsProvider>()); return c.GetPreviousCode(); })); }
public void CheckPreviousCodeExamples(string previousCode, string futureCode) { var code = new FutureCode(futureCode, 2016, TestProviderHelper.FutureSettingsProvider); Assert.Equal(previousCode, code.GetPreviousCode()); }