Conversation
jnyrup
left a comment
There was a problem hiding this comment.
Besides the single comment I'm good with this.
|
I don't know how to arrange a test for |
Cast any enum to a value that's not listed. For example |
|
ahh.. thank you :) |
|
To be honest, I see no value in those extra tests. This is internal code that is already covered by all other code and only exists because of that other code. In fact, |
|
Ok, removing dead code counts as "improve code coverage" IMO :) |
|
But: I search for of this method.. I found four references ( I will check this tomorrow if this will have a negative side effect if I remove them.. |
|
There's an overload. |
|
How I can see the code coverage on coveralls for the latest CI build? |
|
I've just started the CI pipeline. For the second latest commit, https://coveralls.io/builds/47906682/source?filename=Src%2FFluentAssertions%2FCommon%2FGuard.cs |
|
And if you can't wait for the bot to post, here are the change for |
|
Instead of adding tests of According to https://coveralls.io/builds/47932179/source?filename=Src%2FFluentAssertions%2FCommon%2FGuard.cs#L58 |
That's exactly what I said ;-) However, I don't get why Coverall did not post an update here. @eNeRGy164 any idea why it sometimes works and sometimes doesn't? |
Here is an example of what I have thought about to be able to remove This applies to all four assertions.. public MethodInfoSelector(IEnumerable<Type> types)
{
types.ToList()
.ForEach(type => Guard.ThrowIfArgumentIsNull(type, nameof(type)));
Guard.ThrowIfArgumentIsNull(types, nameof(types));
selectedMethods = types.SelectMany(t => t
.GetMethods(BindingFlags.DeclaredOnly | BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic)
.Where(method => !HasSpecialName(method)));
}because removing the overload would be a breaking change IMO |
|
It's non-breaking to remove any unused members of So
|
|
ok, that was completely my fault 🙈 I have written the tests and therefore it showes up "2 usages".. (the tests) I should have checked that before writing the tests :D |
At first, there was no run CI initiated by default because it's @ITaluone's first contribution. |
Those tests can be removed anyway. |
|
ok, got it |

This ref. #1823
I don't know if these tests are important, but in case they are..
IMPORTANT