Reputation: 3927
I've a UWP project for which I'm doing unit testing. Here's the code
[UITestMethod]
[DataRow("123", IMAdSize.Banner300x50)]
public void TestValidCreationOfIMBannerObject(string placementId, IMAdSize size) {
IMBanner banner = new IMBanner(placementId, size);
List<IMErrorCode> receivedEvents = new List<IMErrorCode>();
banner.OnAdFailed += delegate (object sender, IMErrorCode e) {
receivedEvents.Add(e);
};
Assert.AreEqual(receivedEvents.Count, 0);
}
However, when I run the above test case, I get exception as below:
System.Reflection.TargetParameterCountException: Parameter count mismatch
I am sending both the parameters that are required by the test case, cannot figure out what could possibly be wrong with above code.
Upvotes: 1
Views: 298
Reputation: 13
I am encountering the same issue: It seems that DataRow
and UITestMethod
together cause this error, as switching to TestMethod
gets rid of the error.
Upvotes: 0