Skip to content

Instantly share code, notes, and snippets.

View sergiowww's full-sized avatar

Sergio Eduardo Dantas de Oliveira sergiowww

View GitHub Profile
public void verificarObjetoCustom(Map<String, Function<JsonPathResultMatchers, ResultMatcher>> expectedProperties) throws Exception {
ResultMatcher[] matchers = expectedProperties.entrySet()
.stream()
.map(entry -> entry.getValue().apply(jsonPath(entry.getKey())))
.toArray(ResultMatcher[]::new);
getCurrentResultAction().andExpectAll(matchers);
}
public <T extends Record> void verificarObjeto(T objeto, Map<String, Function<T, ?>> expectedProperties) throws Exception {
@sergiowww
sergiowww / gist:5d079aa9e2287c181312082659ca4ec5
Created April 24, 2025 11:48
Map end/home key correctly on MacOS #mac-keyboard
mkdir -p ~/Library/KeyBindings
vim ~/Library/KeyBindings/DefaultKeyBinding.dict
Paste the following content:
{
/* Remap Home / End keys */
/* Home Button*/
"\UF729" = "moveToBeginningOfLine:";
/* End Button */