Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ramon-felipe/nullobjectpatterntest
https://github.com/ramon-felipe/nullobjectpatterntest
Last synced: 13 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/ramon-felipe/nullobjectpatterntest
- Owner: ramon-felipe
- Created: 2021-05-21T01:00:27.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2021-05-21T13:38:18.000Z (over 3 years ago)
- Last Synced: 2024-11-09T18:30:58.002Z (2 months ago)
- Language: C#
- Size: 105 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Description
It is a simple test showing how to use the null object pattern.
Instead of always verifying if an instance is null, we create a new class that will be placed in case of unimplemented code and we decide what is this object behavior.This simple test also makes use of SOLID principles:
- Separeted classes with their own responsibilities (SRP)
- The Program class uses a factory to get an object, so it is opened for extension and closed for modification. (OCP)
- The child classes can substitute the base class without compromising its functionality, achieving that by using abstract class and methods (LSP)