This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.fortitudetec.junit.jupiter; | |
import org.junit.jupiter.params.ParameterizedTest; | |
import org.junit.jupiter.params.provider.EnumSource; | |
/** | |
* Tested on: | |
* IntelliJ 2018.3.2, 2018.3.3 | |
* macOS Mojave 10.14.2 | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.fortitudetec.junit.jupiter; | |
import io.dropwizard.testing.junit5.DropwizardClientExtension; | |
import io.dropwizard.testing.junit5.DropwizardExtensionsSupport; | |
import org.junit.jupiter.api.Test; | |
import org.junit.jupiter.api.extension.ExtendWith; | |
import javax.ws.rs.GET; | |
import javax.ws.rs.Path; | |
import javax.ws.rs.PathParam; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.kiwiproject.registry.config; | |
import java.util.Optional; | |
public interface ServiceInfo { | |
int getApplicationPort(); | |
Optional<Integer> getApplicationSecurePort(); | |
int getAdminPort(); | |
RegistryInfo getRegistryInfo(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jshell> var lst = List.of() | |
lst ==> [] | |
jshell> var m = lst.getClass().getMethod("isEmpty") | |
m ==> public boolean java.util.ImmutableCollections$ListN.isEmpty() | |
jshell> var result = m.invoke(lst) | |
| Exception java.lang.IllegalAccessException: class REPL.$JShell$12B cannot access a member of class java.util.ImmutableCollections$ListN (in module java.base) with modifiers "public" | |
| at Reflection.newIllegalAccessException (Reflection.java:361) | |
| at AccessibleObject.checkAccess (AccessibleObject.java:591) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.acme.examples; | |
import static com.acme.examples.ClassA.method1; | |
import static com.acme.examples.ClassA.method2; | |
import static com.acme.examples.ClassA.method3; | |
import static com.acme.examples.ClassB.method1; | |
import static com.acme.examples.ClassB.method2; | |
import static com.acme.examples.ClassB.method3; | |
public class StaticImports { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.kiwiproject.examples; | |
import com.github.rholder.retry.AttemptTimeLimiters; | |
import com.github.rholder.retry.RetryException; | |
import com.github.rholder.retry.Retryer; | |
import com.github.rholder.retry.RetryerBuilder; | |
import com.github.rholder.retry.StopStrategies; | |
import com.github.rholder.retry.WaitStrategies; | |
import lombok.extern.slf4j.Slf4j; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.kiwiproject.examples; | |
import com.github.rholder.retry.AttemptTimeLimiters; | |
import com.github.rholder.retry.RetryException; | |
import com.github.rholder.retry.Retryer; | |
import com.github.rholder.retry.RetryerBuilder; | |
import com.github.rholder.retry.StopStrategies; | |
import com.github.rholder.retry.WaitStrategies; | |
import lombok.extern.slf4j.Slf4j; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <regex> | |
#include <string> | |
#include <getopt.h> | |
using namespace std; | |
bool validate_uuid(const std::string& s) | |
{ | |
static const std::regex e("^[0-9a-f]{8}-[0-9a-f]{4}-[0-5][0-9a-f]{3}-[089ab][0-9a-f]{3}-[0-9a-f]{12}$", std::regex_constants::icase); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
file_to_verify=$1 | |
expected_checksum=$2 | |
diff <(sha256sum $file_to_verify | cut -f 1 -d \ ) <(echo $expected_checksum) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public Response receiveMetadata(String metadata) { | |
var response = client.sendMetadata(metadata); | |
// Here, successful is from KiwiResponses, and this method does NOT close the Response and | |
// since we are not consuming the response entity, could this cause the problem? | |
if (successful(response)) { | |
return Response.ok.build(); | |
} | |
OlderNewer