Skip to content
This repository has been archived by the owner on Dec 18, 2023. It is now read-only.

Refactoring coding kata. -- Exercises

Notifications You must be signed in to change notification settings

SoftDevGang/untangled-conditionals-kata

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Untangled Conditionals Kata

Build Status

This repository contains a simple coding kata.

Category: refactoring
Skill Level: beginner
Time: ~30 mins

This repository contains the starting code. The logic is contained in a single method, Pipeline.run(). This method contains a number of embedded if statements. Your goal is to refactor the code to a more understandable and desireable state.

Remember, keep the tests passing while you refactor!

Approach

Below you can find some resources demonstrating the approach that this kata was designed to teach. However, I recommend you try the kata yourself first, and then review the resources.

Requirements

We are creating a spike Pipeline class which controls tour build pipeline. We will have dependencies for Config, Email, Logging and Project information later.

  • If the project has tests we run tests

    • we log test result (success or failure)
  • if there are no tests we log that there are no tests and proceed

  • if tests passed (or no tests) we deploy the project.

    • we log deploy result (success or failure)
  • if config is set to send emails, we send email report

    • when test and deploy passed we email a report of that
    • when deploy failed we email a report that
    • when test failed we email a report that
    • else we log that email is disabled.

About

Refactoring coding kata. -- Exercises

Resources

Stars

Watchers

Forks

Languages

  • C++ 95.5%
  • PHP 1.9%
  • Java 1.5%
  • Other 1.1%