What is a unit test? - Deepstash
Introduction to Web 3.0

Learn more about technologyandthefuture with this collection

The differences between Web 2.0 and Web 3.0

The future of the internet

Understanding the potential of Web 3.0

Introduction to Web 3.0

Discover 36 similar ideas in

It takes just

6 mins to read

What is a unit test?

Unit tests test individual units (modules, functions, classes) in isolation from the rest of the program.

  • Generally, units are tested using the public interface of the unit, known as black-box testing. It leads to less brittle tests.
  • In white box testing - where tests are aware of implementation details - any change to the implementation details could break the test, even if the public API continues to function as expected.

3

0 reads

MORE IDEAS ON THIS

Composition and mocking

All software development is about the process of breaking a big problem down into smaller independent parts, combining the solutions to form an application that solves the big problem. 

Mocking is necessary when the decomposition strategy failed. When decomposition succeeds, a generic compo...

3

0 reads

What is test coverage?

Code coverage is the amount of code covered by a test. Increasing coverage beyond 90% seems to have little continued correlation with lower bug density.

There are two kinds of coverage: 

  • Code coverage: how much of the code is exercised, and 
  • Case coverag...

3

0 reads

Tight coupling

Less coupling makes code easier to extend and maintain. Tight coupling makes code more rigid and brittle and more likely to break when changes are needed.

Coupling takes different forms: 

  • Subclass coupling is dependent on the implementation and hierarchy of the p...

3

0 reads

TDD should lead to better design

TDD should lead to better design

TDD should simplify code, not make it more complicated. If your code becomes harder to read or maintain when you make it testable, you're doing TDD wrong.

You can learn two things:

  • You can write decoupled code without dependency injection, and

3

1 read

Causes of tight coupling

Tight coupling has many causes: 

  • Mutation vs immutability  
  • Side-Effects vs purity/isolated side-effects  
  • Responsibility overload vs Do One Thing (DOT)  
  • Procedural instructions vs describing s...

3

0 reads

Code smell

A code smell is a surface indication that points to a deeper problem in the system.

Different types of code need different levels (and different kinds) of mocks. Some code exists primarily to facilitate I/O, in which case, there is little to do other than test I/O. Reducing...

3

0 reads

CURATED FROM

CURATED BY

jopineda

Illustrator

stash-superman-illustration

Explore the World’s

Best Ideas

200,000+ ideas on pretty much any topic. Created by the smartest people around & well-organized so you can explore at will.

An Idea for Everything

Explore the biggest library of insights. And we've infused it with powerful filtering tools so you can easily find what you need.

Knowledge Library

Powerful Saving & Organizational Tools

Save ideas for later reading, for personalized stashes, or for remembering it later.

# Personal Growth

Take Your Ideas

Anywhere

Organize your ideas & listen on the go. And with Pro, there are no limits.

Listen on the go

Just press play and we take care of the words.

Never worry about spotty connections

No Internet access? No problem. Within the mobile app, all your ideas are available, even when offline.

Get Organized with Stashes

Ideas for your next work project? Quotes that inspire you? Put them in the right place so you never lose them.

Join

2 Million Stashers

4.8

5,740 Reviews

App Store

4.7

72,690 Reviews

Google Play

Shankul Varada

Best app ever! You heard it right. This app has helped me get back on my quest to get things done while equipping myself with knowledge everyday.

samz905

Don’t look further if you love learning new things. A refreshing concept that provides quick ideas for busy thought leaders.

Ashley Anthony

This app is LOADED with RELEVANT, HELPFUL, AND EDUCATIONAL material. It is creatively intellectual, yet minimal enough to not overstimulate and create a learning block. I am exceptionally impressed with this app!

Sean Green

Great interesting short snippets of informative articles. Highly recommended to anyone who loves information and lacks patience.

Jamyson Haug

Great for quick bits of information and interesting ideas around whatever topics you are interested in. Visually, it looks great as well.

Laetitia Berton

I have only been using it for a few days now, but I have found answers to questions I had never consciously formulated, or to problems I face everyday at work or at home. I wish I had found this earlier, highly recommended!

Giovanna Scalzone

Brilliant. It feels fresh and encouraging. So many interesting pieces of information that are just enough to absorb and apply. So happy I found this.

Ghazala Begum

Even five minutes a day will improve your thinking. I've come across new ideas and learnt to improve existing ways to become more motivated, confident and happier.

Read & Learn

20x Faster

without
deepstash

with
deepstash

with

deepstash

Access to 200,000+ ideas

Access to the mobile app

Unlimited idea saving & library

Unlimited history

Unlimited listening to ideas

Downloading & offline access

Personalized recommendations

Supercharge your mind with one idea per day

Enter your email and spend 1 minute every day to learn something new.

Email

I agree to receive email updates