-
-
Notifications
You must be signed in to change notification settings - Fork 171
New issue
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
Consider narrowing the scope of GitExtensionsTest #524
Comments
I tend to favor testing at the lowest level possible where public API makes sense. Now, maybe a lot of these |
You raise a good point, though I think Here's why. (I'll focus on the
To make sure we can re-use the unit tests which excercise
Here's the detailed overview of the various overloads and their call sites:
|
Great points. Hiding it all behind Do you want to take this on? Your analysis and suggested course sounds good. |
Many unit tests in the
GitExtensionsTest
class are covering core functionality of NerdBank.GitVersioning, mainly via the.GetHeight(...)
extension methods.I believe the result of the version height calculation should be considered observable behavior of the
VersionOracle
class, and most of the unit tests in theGitExtensions
class could be moved to theVersionOracleTests
class and invoke theVersionOracle
class directly.For example, there's
GitExtensionsTest.GetVersionHeight_ProgressAndReset
andVersionOracleTests.VersionHeightResetsWithVersionSpecChanges
. I think they are both testing essentially the same observable behavior, and these unit tests should be located in the same class.This would help unit testing the changes in #521 .
@AArnott what do you think?
The text was updated successfully, but these errors were encountered: