Skip to content

Instantly share code, notes, and snippets.

View tpiekarski's full-sized avatar
⌨️

Thomas Piekarski tpiekarski

⌨️
View GitHub Profile
@tpiekarski
tpiekarski / java-spring-access-mvc-responses.java
Created November 7, 2019 09:30
Accessing Responses from Spring MVC in Unit Tests
package ...;
import ...;
@ExtendWith(SpringExtension.class)
@WebMvcTest(controllers = SomeMVCController.class, secure = false)
class SomeMVCUnitTests {
@Autowired
private MockMvc mvc;
@tpiekarski
tpiekarski / selenide-live-screenshots.java
Created November 21, 2019 13:09
Live Screenshots of Selenide/Selenium inside IDEA
// For taking live screenshots in Selenide/Selenium Tests inside IDEAs Debugger watch that expression:
Screenshots.takeScreenShotAsImage($("*"))
@tpiekarski
tpiekarski / Log.java
Created March 6, 2020 21:07
A mock for Log while running tests for Android
package android.util;
import java.util.Locale;
import static java.lang.System.out;
@SuppressWarnings("UnusedReturnValue")
public class Log {
private static final int DEFAULT_RETURN_VALUE = 0;
@tpiekarski
tpiekarski / mounting-iso-images.sh
Created March 23, 2020 10:18
Mounting ISO Images
# Example how to mount an ISO image file
sudo mount -o loop <image.iso> <directory>