【发布时间】:2018-05-20 17:18:03
【问题描述】:
我想对我的方法进行测试,我可以传递 2 个字符串变量,但我不知道如何传递 Dictionary<,>。
看起来像这样:
[Test]
[TestCase("agr1", "askdwskdls", Dictionary<TypeMeasurement,double>)]
public void SendDataToAgregator_GoodVariables_ReturnsOn(string agrID,string devID, Dictionary<TypeMeasurement, double> measurement)
{
}
TypeMeasurement 是enum,我知道这不是你传递字典的方式,但我不知道如何,所以我把它放在那里以便你知道我想做什么。
【问题讨论】:
标签: c# unit-testing testing nunit