How would you check the parameters of a function that takes a dictionary?
IDictionary<string, string> someDictionary = new Dictionary<string, string> {
{"Key1", "Value1"},
{"Key2", "Value2"}
};
Expect.Call(delegate {someService.GetCodes(someDictionary);}).Constraints(...);
Basically, I want to check that the parameter for GetCodes has the same values ββas the variable "someDictionary".
I forgot to mention that the test method builds a dictionary and passes it to the someService.GetCodes () method.
public void SomeOtherMethod() {
IDictionary<string, string> dict = new Dictionary<string, string> {
{"Key 1", "Value 1"},
{"Key 2", "Value 2"}
};
someService.GetCodes(dict);
IDictionary<string, string> dict2 = new Dictionary<string, string> {
{"Key 1", "Value 1a"},
{"Key 2a", "Value 2"}
};
someService.GetCodes(dict2);
}
so I want to make sure that the dictionary passed to the GetCodes method contains the same ones as in the Expect.Call method ....
Another use case might be that maybe I just want to see if the keys of the dictionary contain "Key 1" and "Key 2", but don't care about the values ββ... Or, / p>