Skip to content

Instantly share code, notes, and snippets.

View oikonomopo's full-sized avatar
💭
I may be slow to respond.

oikonomopo oikonomopo

💭
I may be slow to respond.
View GitHub Profile
@oikonomopo
oikonomopo / spock-cheat-sheet.md
Created April 12, 2023 09:44 — forked from schultzisaiah/spock-cheat-sheet.md
Spock Testing: Overview and Cheat Sheet

Spock Testing

This is a copy/MD-conversion of the original article by Lukasz Janicki: Spock Testing – Spock tutorial – The Javatar . The webpage is no longer available, but this cheat-sheet is too good to loose! A simpler full demo of a Spock implementation can also be found here.

What is Spock?

Spock is a unit testing framework that in great extent utilizes Groovy’s syntax making your tests comprehensible and easy on the eyes. Although it is a Groovy technology you can use it to test your Java classes as well. What is the most important is that Spock makes writing tests fun. And I really mean it.

Why Spock?

I have to admit that even knowing all the benefits of TDD and tests over all I considered writing them as little pain in the neck. How has that changed when I started using Spock?

  1. Creating a test in Spock takes less time than using its sta
@oikonomopo
oikonomopo / Windows Defender Exclusions for Developer.ps1
Last active November 24, 2021 10:21 — forked from nerzhulart/Windows Defender Exclusions for Developer.ps1
Adds Windows Defender exclusions for java web developers using IntelliJ IDEA IDE (#intellij-idea, #java, #maven, #jrebel, #git etc.)
$userPath = $env:USERPROFILE
$pathExclusions = New-Object System.Collections.ArrayList
$processExclusions = New-Object System.Collections.ArrayList
# Maven: default local repository (%USERPROFILE%\.m2)
$pathExclusions.Add($userPath + '\.m2') > $null
# JRebel: default home folder (%USERPROFILE%\.jrebel)
$pathExclusions.Add($userPath + '\.jrebel') > $null
@oikonomopo
oikonomopo / IntelIJTrialReset.bat
Created February 7, 2020 10:45
How to Reset InteIIiJ IDEA Evaluation Key in Windows
cd "C:%HOMEPATH%\.IntelliJIdea*\config"
rmdir "eval" /s /q
del "options\other.xml"
reg delete "HKEY_CURRENT_USER\Software\JavaSoft\Prefs\jetbrains\idea" /f
:: This will work for idea 2018.3 and later
::
:: It is Highly Advised to Purchase the JetBrain Softwares
:: This is only for the case You just want to Extend the
:: Trial Period and Evaluate the IDE for some more Time