Design Patterns and Practices in .Net: Option Functional Type in C#

Dealing with nulls in the code using the optional type.

Functional programming uses the option type widely, in languages such as Haskell, F#, Scala and a lot more. In this language it’s a convention to return a value when the function fails. The following example is a function written in F#, to show how the option type works:

SUT Factory

What is the best way to create the system under test?

SUT factory may be a fancy name to what is basically a utility method, used to create an instance of the system under test. The main point of a SUT Factory is to reduce code duplication and improve maintainability of your unit tests suite.

What are Stubs?

Do you know are stubs are?

The definition of stubs can cause confusion sometimes. There are many definitions that you can find in a lot of places, stubs and mock definitions can be pretty similar sometimes, and have a good understanding of both can make the difference when writing highly maintainable unit tests.

Pagination


© 2021. All rights reserved.

Powered by Hydejack v9.1.4