Posts

Showing posts with the label TDD

HPS (Hierarchy Property Service): Initial Setup

First steps for HPS (Hierarchy Property Service) Ok, after the first problems I was able to start coding. Because I want TDD I was really missing lein-test-refresh, but after some research I found  Kaocha Kaocha Basically is a full fledged tool for Testing.  There are some steps to do to just have an initial setup: Add a dependency on your deps.edn :aliases {:test {:extra-paths ["src/test/clojure"] :extra-deps {lambdaisland/kaocha {:mvn/version "1.0.641"}} Do your setup of kaocha, basically create a script at ~/bin/kaocha and chmod +x it, inside write: clojure -A:test -m kaocha.runner "$@" Create a tests.edn in your foolder, (this step is needed if you don't have your tests in a test folder on the root of your project): #kaocha/v1 {:tests [{:id :unit                  :test-paths ["src/test/clojure"]}]} #kaocha/v1 is a default configuration for kaocha, while the other one set the tests path for my project.  now run in a ter...

First project: Spring Cloud with Swagger 3 API documentation in Clojure

How can I restart working on Clojure... Let's create a new Generic Opensource service that can be useful to anyone. I will do a series of Posts that will show the journey to create it. Service: Hierarchy Property System I want to create a Hierarchy Property System, this service will have the ability to define a Hierarchy of Objects. For example I can define this hierarchy: Root Level (the generic one) Group Of User User A property set at Root Level will be the default for all the other sub objects, but if I override a property on SubUser level, that specific SubUser will have the value for Property Overriden. Example for AB testing, you have a Commercial Web Site and you have implemented in your service a new cool Feature, called "I will get your Money for poor people", this feature will be activated if the property " robinHood " is set to true, the configuration will be: RootLevel ->  robinHood: false User(id: 12345) ->   robinHood: true So all other serv...