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); }
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); }