예제 #1
0
        public void GetTableInformation_SegmentsNoVariants(string country, string commodity, string portfolio)
        {
            var segments = new string[] { country, commodity, portfolio };
            var expected = MockTableInfo <TestModel>(segments);

            var result = MultiTableParser.GetTableInfo <TestModel>(segments);

            Assert.NotNull(result);
            AssertTableInformation(expected, result);
        }
예제 #2
0
        public void GetTableInformation_EntityWithVariants(string country, string commodity, string portfolio, string[] ignore = null)
        {
            var segments = new string[] { country, commodity, portfolio };
            var expected = MockTableInfo <TestModelWithVariants>(segments, ignore);
            var entity   = new TestModelWithVariants
            {
                Country   = country,
                Commodity = commodity,
                Portfolio = portfolio
            };

            var result = MultiTableParser.GetTableInfo(entity);

            Assert.NotNull(result);
            AssertTableInformation(expected, result);
        }