This file contains hidden or 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
version: 2.1 | |
jobs: | |
say-hello: | |
docker: | |
- image: cimg/base:stable | |
steps: | |
- checkout | |
- run: | |
name: "Say hello from external config.yml" |
This file contains hidden or 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
@Test | |
void testToList() { | |
List<String> list = Stream.of("a", "b").map(String::toUpperCase).toList(); | |
assertEquals("[A, B]", list.toString()); | |
} |
This file contains hidden or 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
record FullName(String firstName, String lastName) {} | |
@Test | |
void testRecords() { | |
var fullName = new FullName("Mitsuyuki", "Shiiba"); | |
assertEquals("Mitsuyuki", fullName.firstName()); | |
assertEquals("Shiiba", fullName.lastName()); | |
assertEquals("FullName[firstName=Mitsuyuki, lastName=Shiiba]", fullName.toString()); | |
} |
This file contains hidden or 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
@Test | |
void testInstanceof1() { | |
Object o = ""; | |
if (o instanceof String s) { | |
assertTrue(s.isEmpty()); | |
return; | |
} | |
fail("ここには来ないよ"); | |
} |
This file contains hidden or 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
@Test | |
void testTextBlocks1() { | |
String html1 = "<html>\n" + | |
" <body>\n" + | |
" <p>Hello, world</p>\n" + | |
" </body>\n" + | |
"</html>\n"; | |
String html2 = """ | |
<html> |
This file contains hidden or 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
int switchSample1(DayOfWeek dayOfWeek) { | |
return switch (dayOfWeek) { | |
case MONDAY, TUESDAY: | |
yield 1; | |
case WEDNESDAY, THURSDAY, FRIDAY: | |
yield 2; | |
case SATURDAY: | |
yield 3; | |
case SUNDAY: | |
yield 4; |
This file contains hidden or 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
@Test | |
void testHelpfulNullPointerExceptions() { | |
NullPointerException npe = assertThrows(NullPointerException.class, () -> { | |
Object o = null; | |
o.toString(); | |
}); | |
assertEquals("Cannot invoke \"Object.toString()\" because \"o\" is null", npe.getMessage()); | |
} |
This file contains hidden or 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
apiVersion: networking.gke.io/v1beta1 | |
kind: ManagedCertificate | |
metadata: | |
name: helloweb-certificate | |
spec: | |
domains: | |
- gke.shiiba.dev |
This file contains hidden or 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
admin: | |
access_log_path: /tmp/admin_access.log | |
address: | |
socket_address: | |
protocol: TCP | |
address: 127.0.0.1 | |
port_value: 9901 | |
static_resources: | |
listeners: | |
- name: listener_0 |
NewerOlder