Skip to content

Latest commit

 

History

History
57 lines (29 loc) · 1.18 KB

File metadata and controls

57 lines (29 loc) · 1.18 KB

How can you test each one of the patterns?

  1. Clone the repository

  2. Run the following command in the terminal

    • npm install
  3. Now you are able to test each one of the examples of the patterns.

Commands to run the main class of each pattern for each example:

Obs: Some of the patterns don't have a main class to test. You can learn them just by taking a look at the main class and reading the README.md summaries.

1. Strategy

1.1 Camera App Case

  • folder: src/patterns/Strategy/CameraAppCase

1.2 Ducks Case

  • folder: src/patterns/Strategy/DucksCase

2. Adapter

2.1 Drones Case

  • npm run test src/patterns/Adapter/DronesCase/target/DuckSimulator.ts

2.2 Ducks Case

  • npm run test src/patterns/Adapter/DucksCase/target/DuckSimulator.ts

3. Observer

3.1 Simple Case

  • folder: src/patterns/Observer/SimpleCase

3.2 Weather Case

  • folder: src/patterns/Observer/WeatherCase

4. Decorator

4.1 Coffree Shop Case

  • npm run test src/patterns/Decorator/CoffeeShopCase/StarbuzzCoffee.ts

4.2 Pizza Store Case

  • npm run test src/patterns/Decorator/PizzaStoreCase/PizzaStore.ts

5. Iterator

  • npm run test src/patterns/Iterator/CafeCase/client/Cafe.ts