Skip to content

Instantly share code, notes, and snippets.

View BeveragesPricingTest.java
package unit_tests;
import beverages.*;
import beverages.supplements.WithCinnamon;
import beverages.supplements.WithCream;
import beverages.supplements.WithMilk;
import org.junit.Assert;
import org.junit.Test;
import static org.hamcrest.CoreMatchers.is;
View hex_2_meeting.md

Temas que tratamos:

1. Ubiquitous Language.

1.1 Modelo nuevo.

Usaremos un glosario como herramienta para documentar el lenguaje.

Trabajar con producto para usar el mismo lenguaje al menos en los oasis que vayamos creando.

View fizzbuzz_test_nums_as_string.clj
(ns fizzbuzz-pbt.core-test
(:require
;; other requires
[fizzbuzz-pbt.core :as sut]))
;; ...
;; some helpers
;; ...
(facts
View fizzbuzz_pbt_core_complete.clj
(ns fizzbuzz-pbt.core
(:require
[clojure.string :as string]))
(defn fizzbuzz []
(map #(string/replace (str %1 %2) #"^$" (str %3))
(cycle ["" "" "Fizz"])
(cycle ["" "" "" "" "Buzz"])
(range 1 101)))
View fizzbuzz_pbt_core_test_complete.clj
(ns fizzbuzz-pbt.core-test
(:require
[midje.sweet :refer :all]
[clojure.set :as set]
[clojure.test.check.generators :as gen]
[midje.experimental :refer [for-all]]
[fizzbuzz-pbt.core :as sut]))
(defn- multiples-of [n]
(iterate #(+ % n) n))
View fizzbuzz_pbt_core_test_fizz_buzz_fizzbuzz.clj
(ns fizzbuzz-pbt.core-test
(:require
;; other requires
[fizzbuzz-pbt.core :as sut]))
;; ...
;; some helpers
;; ...
(facts
View fizzbuzz_pbt_core_fizz_buzz.clj
(ns fizzbuzz-pbt.core)
(defn fizzbuzz []
(take 100 (map #(str %1 %2)
(cycle ["" "" "Fizz"])
(cycle ["" "" "" "" "Buzz"]))))
View fizzbuzz_pbt_core_test_fizz_buzz.clj
(ns fizzbuzz-pbt.core-test
(:require
;; other requires
[fizzbuzz-pbt.core :as sut]))
;; ...
;; some helpers
;; ...
(facts
View fizzbuzz_pbt_core_fizz.clj
(ns fizzbuzz-pbt.core)
(defn fizzbuzz []
(take 100 (cycle ["" "" "Fizz"])))
View fizzbuzz_pbt_core_test_fizz.clj
(ns fizzbuzz-pbt.core-test
(:require
[midje.sweet :refer :all]
[clojure.set :as set]
[clojure.test.check.generators :as gen]
[midje.experimental :refer [for-all]]
[fizzbuzz-pbt.core :as sut]))
(defn- multiples-of [n]
(iterate #(+ % n) n))
You can’t perform that action at this time.