示例#1
0
        public void GetValue_ValueIsFound(int capacity)
        {
            // arrange
            var resultMap = new ResultMap();

            resultMap.EnsureCapacity(capacity);
            resultMap.SetValue(0, "abc", "def");
            resultMap.SetValue(1, "def", "def");
            resultMap.SetValue(2, "ghi", "def");

            // act
            ResultValue value = resultMap.GetValue("def", out int index);

            // assert
            Assert.Equal("def", value.Name);
            Assert.Equal(1, index);
        }