In testing a site, I end up getting really long class files testing lots of different parts of a website. I could break them into separate classes but then I would need to pass around Browser Objects and seems like lots of extra overhead. I could also add a “code file” which I think could just be included in the main class I’m working in and have it hold functions. Whats the right way to break up a big c# class file into smaller files?
Share
As you said your class “testing lots of different parts of a website” make a single class for single part of a website.
For instance you can take two steps for refactoring.
1. Break class into several files using partial keyword.
2. Step by step remove partial and rename class name accroding to its responsobility.