matkoch / TestFx

Next Level Testing.
Apache License 2.0
34 stars 4 forks source link

MSpec [Subject] attribute treats the Concern argument as a method identifier #8

Closed NameOfTheDragon closed 8 years ago

NameOfTheDragon commented 8 years ago

While it is a nice feature, the string argument to an MSpec [Subject] attribute (the Concernparameter) isn't necessarily supposed to be the name of a method of the subject. I believe it is intended more to be descriptive text, as in (for example):

`[Subject(typeof(BankAccount), "funds transfer")]`

TestFX appears to cause this parameter to be treated as a method name and it get's highlighted in red and flagged (by ReSharper, I think) as an error when it doesn't correspond to a method name:

image

I'm not sure what mechanism causes this behaviour, but it doesn't happen with MSpec. I don't know if this is right or wrong, but I think it is at least worth opening a discussion as to whether this is desirable as it seems to suggest a different intent than that used in MSpec.

matkoch commented 8 years ago

You're completely right. Some parts of the ReSharper plugin are not yet framework-aware.