You are not logged in. Your edit will be placed in a queue until it is peer reviewed.
We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.
- 8I've read each of your questions, recently, and I've noticed a general misunderstanding of what constitutes a unit test, why people write unit tests, and how best to actually structure code to facilitate testing. It is difficult to answer this question, because there are so many misunderstandings. It almost sounds like "unit testing" has been pounded into your head by others without fully explaining why. Given the effort you've made to write thoughtful questions (despite this community's propensity to down-vote everything), you really seem to be struggling with this.Greg Burghardt– Greg Burghardt2024-03-20 19:44:33 +00:00Commented Mar 20, 2024 at 19:44
- 2Can you edit the last paragraph of your question to focus on a single perspective of this? We have too many questions in one post to make this answerable.Greg Burghardt– Greg Burghardt2024-03-20 19:48:28 +00:00Commented Mar 20, 2024 at 19:48
- @GregBurghardt Ugh... I'm thinking about it and I'm not sure how to tackle this. The last paragraph has 3 questions. The 3rd one is what I care about, but I need the 2nd one to state the 3rd one. In retrospect I should've probably asked two different questions: (1) does an architecture that follows SRP and prefers very tiny methods mean that classes and methods will be rearranged very often? and (2) in light of (1), are unit tests not fragile? I should probably cut this question to (1), but I can't because it already has two answers covering (2)gaazkam– gaazkam2024-03-20 21:39:25 +00:00Commented Mar 20, 2024 at 21:39
- 2To be honest, the SRP and the number of lines in a class or method is completely irrelevant for unit testing. And remember those are guidelines for designing modules in your application. Use them when they make sense. Discard them with prejudice when they don't.Greg Burghardt– Greg Burghardt2024-03-20 22:13:57 +00:00Commented Mar 20, 2024 at 22:13
- I think the questions in the last paragraph are related enough, to be honest.Greg Burghardt– Greg Burghardt2024-03-20 22:19:25 +00:00Commented Mar 20, 2024 at 22:19
| Show 3 more comments
How to Edit
- Correct minor typos or mistakes
- Clarify meaning without changing it
- Add related resources or links
- Always respect the author’s intent
- Don’t use edits to reply to the author
How to Format
- create code fences with backticks ` or tildes ~ ```
like so
``` - add language identifier to highlight code ```python
def function(foo):
print(foo)
``` - put returns between paragraphs
- for linebreak add 2 spaces at end
- _italic_ or **bold**
- indent code by 4 spaces
- backtick escapes
`like _so_` - quote by placing > at start of line
- to make links (use https whenever possible) <https://example.com>[example](https://example.com)<a href="https://example.com">example</a>
How to Tag
A tag is a keyword or label that categorizes your question with other, similar questions. Choose one or more (up to 5) tags that will help answerers to find and interpret your question.
- complete the sentence: my question is about...
- use tags that describe things or concepts that are essential, not incidental to your question
- favor using existing popular tags
- read the descriptions that appear below the tag
If your question is primarily about a topic for which you can't find a tag:
- combine multiple words into single-words with hyphens (e.g. design-patterns), up to a maximum of 35 characters
- creating new tags is a privilege; if you can't yet create a tag you need, then post this question without it, then ask the community to create it for you