示例#1
0
        public void TestGetIndex()
        {
            var allVariables   = new[] { "A", "B", "C", "D" };
            var foundVariables = new[] { "D", "B" };
            var index          = SubsetUtils.GetIndex(foundVariables, allVariables);

            Assert.Equal(10, index);
        }
示例#2
0
        public void TestFromAndGetIndex()
        {
            const int index              = 103;
            var       allVariables       = new[] { "A", "B", "C", "D", "E", "F", "G" };
            var       variablesFromIndex = SubsetUtils.FromIndex(allVariables, index);
            var       calculatedIndex    = SubsetUtils.GetIndex(variablesFromIndex, allVariables);

            Assert.Equal(index, calculatedIndex);
        }