We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
For each command of each command class, write UTs.
For "get"/"report" command pairs, something like:
MockDriver driver = new(); Node node = new Node(); FooCommandClass commandClass = new(node, driver, ...); ReadOnlySpan<byte> responseData = new[] { ... }; dirver.MockResponse(FooCommand.Get, responseData); var state = await commandClass.GetAsync(); // Verify the report command's parsing Assert.AreEqual(someValue, commandClass.State.Something); // Verify Get command's binary format Assert.AreEqual(1, driver.SentCommands.Count); CollectionAssert.AreEqual(new[] { ... }, driver.SentCommands[0]);
"Set" commands would be similar, but without the response part.
Likely interfaces would need to be introduced, for example IDriver so that a MockDriver could be produced for the UT.
IDriver
MockDriver
CCs needing UTs:
The text was updated successfully, but these errors were encountered:
No branches or pull requests
For each command of each command class, write UTs.
For "get"/"report" command pairs, something like:
"Set" commands would be similar, but without the response part.
Likely interfaces would need to be introduced, for example
IDriver
so that aMockDriver
could be produced for the UT.CCs needing UTs:
The text was updated successfully, but these errors were encountered: