@${testType:newType(org.junit.Before)}
public void setUp() throws Exception {
${cursor}
}
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 learning.junit5; | |
import static org.assertj.core.api.Assertions.*; | |
import static org.junit.jupiter.api.condition.OS.*; | |
import java.util.Map; | |
import org.assertj.core.util.Maps; | |
import org.junit.jupiter.api.AfterAll; | |
import org.junit.jupiter.api.AfterEach; |
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 salarycalculation.web.resources; | |
import static com.github.tomakehurst.wiremock.client.WireMock.aResponse; | |
import static com.github.tomakehurst.wiremock.client.WireMock.get; | |
import static com.github.tomakehurst.wiremock.client.WireMock.stubFor; | |
import static com.github.tomakehurst.wiremock.client.WireMock.urlEqualTo; | |
import static org.assertj.core.api.Assertions.assertThat; | |
import java.net.HttpURLConnection; | |
import java.net.URL; |
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 unittest; | |
import static org.assertj.core.api.Assertions.assertThat; | |
import java.util.Arrays; | |
import java.util.List; | |
import java.util.stream.Collectors; | |
import org.junit.Test; |
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
import static org.assertj.core.api.Assertions.assertThat; | |
import static org.assertj.core.api.Assertions.fail; | |
import org.junit.Before; | |
import org.junit.Test; | |
public class CalculatorTest { | |
private Calculator testee; |
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 int getAnnualTotalSalaryPlan() { | |
// 基準内給与 | |
int standardSalary = baseSalary() + capabilityRankAllowance(); | |
// 想定年収 | |
int annualTotalSalaryPlan = (standardSalary) * 12; | |
return annualTotalSalaryPlan; | |
} |
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 List<Employee> findByRole(String rank) { | |
String query = "select * from employee where roleRank = ? order by no"; | |
return findByQuery(query, rank); | |
} | |
public List<Employee> findByCapability(String rank) { | |
String query = "select * from employee where capabilityRank = ? order by no"; | |
return findByQuery(query, rank); | |
} |
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.example.ble; | |
import android.bluetooth.BluetoothAdapter; | |
import android.bluetooth.BluetoothDevice; | |
import android.bluetooth.BluetoothGatt; | |
import android.bluetooth.BluetoothGattCallback; | |
import android.bluetooth.BluetoothGattCharacteristic; | |
import android.bluetooth.BluetoothGattDescriptor; | |
import android.bluetooth.BluetoothGattService; | |
import android.bluetooth.BluetoothManager; |
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
import static org.assertj.core.api.Assertions.assertThat; | |
import org.assertj.core.util.Arrays; | |
import org.junit.Test; | |
public class AssertJArrayLearning { | |
@Test | |
public void contains() { | |
String[] actuals = Arrays.array("Lucy", "Debit", "Anna", "Jack"); |
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
<phpunit | |
bootstrap="bootstrap.php" | |
colors="true" | |
convertErrorsToExceptions="true" | |
convertNoticesToExceptions="true" | |
convertWarningsToExceptions="true" | |
forceCoversAnnotation="true" | |
stopOnError="false" | |
stopOnFailure="false" | |
stopOnSkipped="false" |
NewerOlder