#Unit-Testing
11 notas · última:
How to explain dependency injection to a 5-year-old?
The answers explain dependency injection as providing an object with what it needs from outside, so it does not create or manage those dependencies itself, which makes testing and reuse easier.
What is the right "unit" in unit testing and why it is not a class?
The talk argues that the right unit for testing is defined by scope and functional boundaries, not by classes, and suggests using heuristics to keep tests focused, stable, and valuable.
Unit Testing Clean Architecture Use Cases
The article shows how to unit test a Clean Architecture use case by mocking dependencies, covering failure and success paths, checking exception propagation, and keeping time-dependent code testable.
9 React Testing Best Practices for Better Design and Quality of Your Tests
The post lists nine practices for React tests: use AAA, keep tests focused, treat snapshots carefully, start with the happy path, cover edge cases and errors, and avoid low-value coverage-driven or third-party internals tests.
No excuses, write unit tests
The text argues that unit testing is worth the upfront time because it exposes how functions behave, makes API changes visible, and catches bugs before they reach production. It also says that writing tests often leads to clearer, smaller, easier-to-test code.
This Is Why We Don't Test Private Methods
The post argues that private methods should be tested indirectly through public behavior, because direct tests break encapsulation and expose internals that other code should not use.
A month without R# or Rider - Editing, Debugging & Refactoring
The author compares Visual Studio 2019 with Rider for editing, refactoring, unit testing, and debugging, and argues that Rider is more complete, faster, and better optimized for keyboard-driven work.
Implementing & Testing Repository Pattern using Entity Framework
The article explains why Repository Pattern can still help with Entity Framework by reducing duplicate query logic, separating persistence concerns, and making business logic easier to unit test through mocking.
Introduction to Unit Testing With NUnit in C#
The article explains unit testing in C# with NUnit, covering the AAA structure, naming conventions, test project setup, parameterized tests, setup and teardown, and metadata attributes.
4 Tips for Mastering Test-Driven Development
The article explains TDD basics and four practical techniques: isolate external calls, test rollbackable migrations, watch code coverage, and use property-based testing to catch bugs earlier.
Programmers Without TDD Will be Unemployable by 2022
The author predicts that by 2022 professional programmers will need routine TDD, with automated unit tests, better maintainability, fewer bugs, and shifts in hiring, training, and tools.
