Apparently, the location function is the issue. I replace the call to the local function with another lambda and it works!
IRenderedComponent<CSInput> component =
RenderComponent<CSInput>(
builder => builder.Add(
instanceOfCSInput => instanceOfCSInput.OnClick,
() => Assert.True(true)));
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…