1つのクラス・モジュール・関数を変更する理由は1つ以上存在してはならない。
- いろいろなものをモックしないといけないのでテストしづらくなる
- 1つ修正したときに周辺確認がやたら多くなり工数が増える
class Disp | |
{ | |
void display() { | |
System.out.println("No argument"); | |
} | |
void display(String s) { | |
System.out.println(s); | |
} | |
void display(String s, int n) { | |
System.out.println(s + ", " + n); |
!!!html5 | |
%html | |
%body | |
%form{:action => '.', :method => 'get'} | |
width | |
%input{:name => 'width', :value => @params['width']} | |
height | |
%input{:name => 'height', :value => @params['height']} | |
fineness | |
%input{:name => 'fineness', :value => @params['fineness']} |
public class ProductMain { | |
public boolean executeMain(ResourceHolder resourceholder) { | |
Log log = BCLogFactory.getLog(ProductMain.class); | |
CommonPrinter commonPrinter = null; | |
Statement statement = null; | |
ResultSet resultSet = null; | |
try { | |
String outputileName = resourceHolder.getOutputFileName(); | |
commonPrinter = new CommonPrinter(outputFileName, "UTF-8"); | |
Connection connection = resourceHolder.getConnection(); |
class PartialUpdate<Props> | |
{ | |
constructor(protected props: Props) { | |
PartialUpdate.deepFreeze(this); | |
} | |
private static deepFreeze(o: any) { | |
Object.freeze(o); | |
var oIsFunction = typeof o === "function"; |
type updator<T> = (prev: T) => T; | |
class PartialUpdate<Props> | |
{ | |
private _props: Props; | |
protected get props(): Props { | |
return this._props; | |
} | |
constructor(props: Props | updator<Props>, prev?: Props) { |
#pragma once | |
/** | |
* @brief コールバックストリームバッファ | |
* @note 出力をバッファリングし、書き込み用の関数をコールバックする | |
*/ | |
class CallbackStreamBuffer : public std::basic_streambuf<char> | |
{ | |
/** | |
* @brief 親クラス |
#include <algorithm> | |
#include <iostream> | |
#include <vector> | |
#include <map> | |
#include <string> | |
#include <queue> | |
#include <stack> | |
#include <set> | |
#include <list> |
#include <functional> | |
#include <iostream> | |
#include <vector> | |
#include <map> | |
#include <initializer_list> | |
class JsonArchive { | |
public: | |
explicit JsonArchive(std::ostream &stream) |
import { EventEmitter, Injectable } from '@angular/core'; | |
import { Overlay, OverlayConfig } from '@angular/cdk/overlay'; | |
import { ComponentPortal, ComponentType } from '@angular/cdk/portal'; | |
import { Observable } from 'rxjs'; | |
import { tap } from 'rxjs/operators'; | |
export interface DialogNeed<Return> { | |
close$: EventEmitter<Return>; | |
} |