示例#1
0
        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();
            }));
        }
示例#2
0
        public void CheckPreviousCodeExamples(string previousCode, string futureCode)
        {
            var code = new FutureCode(futureCode, 2016, TestProviderHelper.FutureSettingsProvider);

            Assert.Equal(previousCode, code.GetPreviousCode());
        }