roslyn-sdk
roslyn-sdk copied to clipboard
Code fix tests with shared files
Hi!
I am writing some code fix tests in which I want to have shared files between projects and wonder if you can offer some help on how to do that realistically.
Case 1 is to have one project reference a file from another projects folder, i.e. a normal link if it had been in a csproj file. I think I have managed to write these tests. You can find them here: https://github.com/bjornhellander/StyleCopAnalyzers/commit/0ac708da38456619ebe31447c5f2cdde8e9db36e#diff-d30e93cd66e2ce8a34fa51449ec63bb9cd1d7d958d9578b4898be0bd7f80e088. I have added notes in the tests that describe what I think they would correspond to in a real csproj file. Does this look correct, or am I testing something else? :-)
Case 2 is to have two projects in the same folder sharing files, so no links in this case, but still shared files. How would I configure my CSharpCodeFixTest object to correctly describe this setup?
I hope I managed to explain this ok and would appreciate some help on this. Thanks in advance!