データベースを使った機能テストや単体テストについて要点をまとめておきます。
筆者の経験を強く反映していますので比較的定性的な内容となります事を予めご了承下さい。
テストの実行前に投入するテストデータは、凡そcsvファイルやxmlファイル、エクセルファイル等で管理する事になります。
仕様の変更に伴いテーブルの定義を変更する事で、それらのファイルの内容とデータベースの間に不整合が発生します。
import java.net.InetSocketAddress; | |
import java.util.ArrayList; | |
import java.util.List; | |
import java.util.regex.Matcher; | |
import java.util.regex.Pattern; | |
/** | |
* @see <a href="http://tools.ietf.org/html/rfc4291">[RFC4291] IP Version 6 | |
* Addressing Architecture</a> | |
* @see <a href="http://tools.ietf.org/html/rfc5952">[RFC5952] A Recommendation |
package main | |
import ( | |
r "github.com/dancannon/gorethink" | |
"log" | |
"time" | |
) | |
func main() { | |
log.Println("BEGIN") |
https://chrome.google.com/webstore/detail/ublacklist/pncfbmialoiaghdehhbnbhkkgmjanfhe | |
*://qiita.com/* | |
*://matome.naver.jp/* | |
*://kyoko-np.net/* | |
*://blog.livedoor.com/* | |
*://dev.classmethod.jp/* |
apply plugin: 'java' | |
sourceCompatibility = targetCompatibility = 1.6 | |
tasks.withType(AbstractCompile) each { it.options.encoding = 'UTF-8' } | |
repositories { | |
mavenCentral() | |
maven {url 'http://maven.seasar.org/maven2'} | |
} |
--disable-self-update-check false | |
--child-concurrency 1 | |
--network-timeout 1000000 |
import java.util.concurrent.ConcurrentHashMap; | |
import java.util.concurrent.ConcurrentMap; | |
import java.util.function.Supplier; | |
public class MemoizeSupplier<T> implements Supplier<T> { | |
final Supplier<T> delegate; | |
ConcurrentMap<Class<?>, T> map = new ConcurrentHashMap<>(1); | |
public MemoizeSupplier(Supplier<T> delegate) { |
Resources: | |
MyCustomDomain: | |
Type: AWS::ApiGatewayV2::DomainName | |
Properties: | |
DomainName: api.example.com | |
DomainNameConfigurations: | |
- CertificateArn: arn:aws:acm:ap-northeast-1:759044339783:certificate/e17e4147-4f27-4ccb-ab1d-a1d6300f118a | |
EndpointType: REGIONAL | |
Outputs: | |
WayWay: |
dependencies { runtime 'org.postgresql:postgresql:9.2-1003-jdbc4' } | |
task installPostgreSQL(type: Copy) { | |
def postgreJar = configurations.runtime.find { it.name.contains('postgresql') } | |
def moduleDir = "$jbossHome/modules/system/layers/base/org/postgresql/main" | |
from postgreJar | |
into moduleDir | |
doLast { |