code
stringlengths 23
201k
| docstring
stringlengths 17
96.2k
| func_name
stringlengths 0
235
| language
stringclasses 1
value | repo
stringlengths 8
72
| path
stringlengths 11
317
| url
stringlengths 57
377
| license
stringclasses 7
values |
|---|---|---|---|---|---|---|---|
public Set<String> getLazyLoadTriggerMethods() {
return lazyLoadTriggerMethods;
}
|
Specifies the database identify value for switching query to use.
|
getLazyLoadTriggerMethods
|
java
|
mybatis/spring-boot-starter
|
mybatis-spring-boot-autoconfigure/src/main/java/org/mybatis/spring/boot/autoconfigure/MybatisProperties.java
|
https://github.com/mybatis/spring-boot-starter/blob/master/mybatis-spring-boot-autoconfigure/src/main/java/org/mybatis/spring/boot/autoconfigure/MybatisProperties.java
|
Apache-2.0
|
public void setLazyLoadTriggerMethods(Set<String> lazyLoadTriggerMethods) {
this.lazyLoadTriggerMethods = lazyLoadTriggerMethods;
}
|
Specifies the database identify value for switching query to use.
|
setLazyLoadTriggerMethods
|
java
|
mybatis/spring-boot-starter
|
mybatis-spring-boot-autoconfigure/src/main/java/org/mybatis/spring/boot/autoconfigure/MybatisProperties.java
|
https://github.com/mybatis/spring-boot-starter/blob/master/mybatis-spring-boot-autoconfigure/src/main/java/org/mybatis/spring/boot/autoconfigure/MybatisProperties.java
|
Apache-2.0
|
public Integer getDefaultStatementTimeout() {
return defaultStatementTimeout;
}
|
Specifies the database identify value for switching query to use.
|
getDefaultStatementTimeout
|
java
|
mybatis/spring-boot-starter
|
mybatis-spring-boot-autoconfigure/src/main/java/org/mybatis/spring/boot/autoconfigure/MybatisProperties.java
|
https://github.com/mybatis/spring-boot-starter/blob/master/mybatis-spring-boot-autoconfigure/src/main/java/org/mybatis/spring/boot/autoconfigure/MybatisProperties.java
|
Apache-2.0
|
public void setDefaultStatementTimeout(Integer defaultStatementTimeout) {
this.defaultStatementTimeout = defaultStatementTimeout;
}
|
Specifies the database identify value for switching query to use.
|
setDefaultStatementTimeout
|
java
|
mybatis/spring-boot-starter
|
mybatis-spring-boot-autoconfigure/src/main/java/org/mybatis/spring/boot/autoconfigure/MybatisProperties.java
|
https://github.com/mybatis/spring-boot-starter/blob/master/mybatis-spring-boot-autoconfigure/src/main/java/org/mybatis/spring/boot/autoconfigure/MybatisProperties.java
|
Apache-2.0
|
public Integer getDefaultFetchSize() {
return defaultFetchSize;
}
|
Specifies the database identify value for switching query to use.
|
getDefaultFetchSize
|
java
|
mybatis/spring-boot-starter
|
mybatis-spring-boot-autoconfigure/src/main/java/org/mybatis/spring/boot/autoconfigure/MybatisProperties.java
|
https://github.com/mybatis/spring-boot-starter/blob/master/mybatis-spring-boot-autoconfigure/src/main/java/org/mybatis/spring/boot/autoconfigure/MybatisProperties.java
|
Apache-2.0
|
public void setDefaultFetchSize(Integer defaultFetchSize) {
this.defaultFetchSize = defaultFetchSize;
}
|
Specifies the database identify value for switching query to use.
|
setDefaultFetchSize
|
java
|
mybatis/spring-boot-starter
|
mybatis-spring-boot-autoconfigure/src/main/java/org/mybatis/spring/boot/autoconfigure/MybatisProperties.java
|
https://github.com/mybatis/spring-boot-starter/blob/master/mybatis-spring-boot-autoconfigure/src/main/java/org/mybatis/spring/boot/autoconfigure/MybatisProperties.java
|
Apache-2.0
|
public ResultSetType getDefaultResultSetType() {
return defaultResultSetType;
}
|
Specifies the database identify value for switching query to use.
|
getDefaultResultSetType
|
java
|
mybatis/spring-boot-starter
|
mybatis-spring-boot-autoconfigure/src/main/java/org/mybatis/spring/boot/autoconfigure/MybatisProperties.java
|
https://github.com/mybatis/spring-boot-starter/blob/master/mybatis-spring-boot-autoconfigure/src/main/java/org/mybatis/spring/boot/autoconfigure/MybatisProperties.java
|
Apache-2.0
|
public void setDefaultResultSetType(ResultSetType defaultResultSetType) {
this.defaultResultSetType = defaultResultSetType;
}
|
Specifies the database identify value for switching query to use.
|
setDefaultResultSetType
|
java
|
mybatis/spring-boot-starter
|
mybatis-spring-boot-autoconfigure/src/main/java/org/mybatis/spring/boot/autoconfigure/MybatisProperties.java
|
https://github.com/mybatis/spring-boot-starter/blob/master/mybatis-spring-boot-autoconfigure/src/main/java/org/mybatis/spring/boot/autoconfigure/MybatisProperties.java
|
Apache-2.0
|
public ExecutorType getDefaultExecutorType() {
return defaultExecutorType;
}
|
Specifies the database identify value for switching query to use.
|
getDefaultExecutorType
|
java
|
mybatis/spring-boot-starter
|
mybatis-spring-boot-autoconfigure/src/main/java/org/mybatis/spring/boot/autoconfigure/MybatisProperties.java
|
https://github.com/mybatis/spring-boot-starter/blob/master/mybatis-spring-boot-autoconfigure/src/main/java/org/mybatis/spring/boot/autoconfigure/MybatisProperties.java
|
Apache-2.0
|
public void setDefaultExecutorType(ExecutorType defaultExecutorType) {
this.defaultExecutorType = defaultExecutorType;
}
|
Specifies the database identify value for switching query to use.
|
setDefaultExecutorType
|
java
|
mybatis/spring-boot-starter
|
mybatis-spring-boot-autoconfigure/src/main/java/org/mybatis/spring/boot/autoconfigure/MybatisProperties.java
|
https://github.com/mybatis/spring-boot-starter/blob/master/mybatis-spring-boot-autoconfigure/src/main/java/org/mybatis/spring/boot/autoconfigure/MybatisProperties.java
|
Apache-2.0
|
public AutoMappingBehavior getAutoMappingBehavior() {
return autoMappingBehavior;
}
|
Specifies the database identify value for switching query to use.
|
getAutoMappingBehavior
|
java
|
mybatis/spring-boot-starter
|
mybatis-spring-boot-autoconfigure/src/main/java/org/mybatis/spring/boot/autoconfigure/MybatisProperties.java
|
https://github.com/mybatis/spring-boot-starter/blob/master/mybatis-spring-boot-autoconfigure/src/main/java/org/mybatis/spring/boot/autoconfigure/MybatisProperties.java
|
Apache-2.0
|
public void setAutoMappingBehavior(AutoMappingBehavior autoMappingBehavior) {
this.autoMappingBehavior = autoMappingBehavior;
}
|
Specifies the database identify value for switching query to use.
|
setAutoMappingBehavior
|
java
|
mybatis/spring-boot-starter
|
mybatis-spring-boot-autoconfigure/src/main/java/org/mybatis/spring/boot/autoconfigure/MybatisProperties.java
|
https://github.com/mybatis/spring-boot-starter/blob/master/mybatis-spring-boot-autoconfigure/src/main/java/org/mybatis/spring/boot/autoconfigure/MybatisProperties.java
|
Apache-2.0
|
public AutoMappingUnknownColumnBehavior getAutoMappingUnknownColumnBehavior() {
return autoMappingUnknownColumnBehavior;
}
|
Specifies the database identify value for switching query to use.
|
getAutoMappingUnknownColumnBehavior
|
java
|
mybatis/spring-boot-starter
|
mybatis-spring-boot-autoconfigure/src/main/java/org/mybatis/spring/boot/autoconfigure/MybatisProperties.java
|
https://github.com/mybatis/spring-boot-starter/blob/master/mybatis-spring-boot-autoconfigure/src/main/java/org/mybatis/spring/boot/autoconfigure/MybatisProperties.java
|
Apache-2.0
|
public void setAutoMappingUnknownColumnBehavior(AutoMappingUnknownColumnBehavior autoMappingUnknownColumnBehavior) {
this.autoMappingUnknownColumnBehavior = autoMappingUnknownColumnBehavior;
}
|
Specifies the database identify value for switching query to use.
|
setAutoMappingUnknownColumnBehavior
|
java
|
mybatis/spring-boot-starter
|
mybatis-spring-boot-autoconfigure/src/main/java/org/mybatis/spring/boot/autoconfigure/MybatisProperties.java
|
https://github.com/mybatis/spring-boot-starter/blob/master/mybatis-spring-boot-autoconfigure/src/main/java/org/mybatis/spring/boot/autoconfigure/MybatisProperties.java
|
Apache-2.0
|
public Properties getVariables() {
return variables;
}
|
Specifies the database identify value for switching query to use.
|
getVariables
|
java
|
mybatis/spring-boot-starter
|
mybatis-spring-boot-autoconfigure/src/main/java/org/mybatis/spring/boot/autoconfigure/MybatisProperties.java
|
https://github.com/mybatis/spring-boot-starter/blob/master/mybatis-spring-boot-autoconfigure/src/main/java/org/mybatis/spring/boot/autoconfigure/MybatisProperties.java
|
Apache-2.0
|
public void setVariables(Properties variables) {
this.variables = variables;
}
|
Specifies the database identify value for switching query to use.
|
setVariables
|
java
|
mybatis/spring-boot-starter
|
mybatis-spring-boot-autoconfigure/src/main/java/org/mybatis/spring/boot/autoconfigure/MybatisProperties.java
|
https://github.com/mybatis/spring-boot-starter/blob/master/mybatis-spring-boot-autoconfigure/src/main/java/org/mybatis/spring/boot/autoconfigure/MybatisProperties.java
|
Apache-2.0
|
public Boolean getLazyLoadingEnabled() {
return lazyLoadingEnabled;
}
|
Specifies the database identify value for switching query to use.
|
getLazyLoadingEnabled
|
java
|
mybatis/spring-boot-starter
|
mybatis-spring-boot-autoconfigure/src/main/java/org/mybatis/spring/boot/autoconfigure/MybatisProperties.java
|
https://github.com/mybatis/spring-boot-starter/blob/master/mybatis-spring-boot-autoconfigure/src/main/java/org/mybatis/spring/boot/autoconfigure/MybatisProperties.java
|
Apache-2.0
|
public void setLazyLoadingEnabled(Boolean lazyLoadingEnabled) {
this.lazyLoadingEnabled = lazyLoadingEnabled;
}
|
Specifies the database identify value for switching query to use.
|
setLazyLoadingEnabled
|
java
|
mybatis/spring-boot-starter
|
mybatis-spring-boot-autoconfigure/src/main/java/org/mybatis/spring/boot/autoconfigure/MybatisProperties.java
|
https://github.com/mybatis/spring-boot-starter/blob/master/mybatis-spring-boot-autoconfigure/src/main/java/org/mybatis/spring/boot/autoconfigure/MybatisProperties.java
|
Apache-2.0
|
public Class<?> getConfigurationFactory() {
return configurationFactory;
}
|
Specifies the database identify value for switching query to use.
|
getConfigurationFactory
|
java
|
mybatis/spring-boot-starter
|
mybatis-spring-boot-autoconfigure/src/main/java/org/mybatis/spring/boot/autoconfigure/MybatisProperties.java
|
https://github.com/mybatis/spring-boot-starter/blob/master/mybatis-spring-boot-autoconfigure/src/main/java/org/mybatis/spring/boot/autoconfigure/MybatisProperties.java
|
Apache-2.0
|
public void setConfigurationFactory(Class<?> configurationFactory) {
this.configurationFactory = configurationFactory;
}
|
Specifies the database identify value for switching query to use.
|
setConfigurationFactory
|
java
|
mybatis/spring-boot-starter
|
mybatis-spring-boot-autoconfigure/src/main/java/org/mybatis/spring/boot/autoconfigure/MybatisProperties.java
|
https://github.com/mybatis/spring-boot-starter/blob/master/mybatis-spring-boot-autoconfigure/src/main/java/org/mybatis/spring/boot/autoconfigure/MybatisProperties.java
|
Apache-2.0
|
public Class<? extends TypeHandler> getDefaultEnumTypeHandler() {
return defaultEnumTypeHandler;
}
|
Specifies the database identify value for switching query to use.
|
getDefaultEnumTypeHandler
|
java
|
mybatis/spring-boot-starter
|
mybatis-spring-boot-autoconfigure/src/main/java/org/mybatis/spring/boot/autoconfigure/MybatisProperties.java
|
https://github.com/mybatis/spring-boot-starter/blob/master/mybatis-spring-boot-autoconfigure/src/main/java/org/mybatis/spring/boot/autoconfigure/MybatisProperties.java
|
Apache-2.0
|
public void setDefaultEnumTypeHandler(Class<? extends TypeHandler> defaultEnumTypeHandler) {
this.defaultEnumTypeHandler = defaultEnumTypeHandler;
}
|
Specifies the database identify value for switching query to use.
|
setDefaultEnumTypeHandler
|
java
|
mybatis/spring-boot-starter
|
mybatis-spring-boot-autoconfigure/src/main/java/org/mybatis/spring/boot/autoconfigure/MybatisProperties.java
|
https://github.com/mybatis/spring-boot-starter/blob/master/mybatis-spring-boot-autoconfigure/src/main/java/org/mybatis/spring/boot/autoconfigure/MybatisProperties.java
|
Apache-2.0
|
public String getDatabaseId() {
return databaseId;
}
|
Specifies the database identify value for switching query to use.
|
getDatabaseId
|
java
|
mybatis/spring-boot-starter
|
mybatis-spring-boot-autoconfigure/src/main/java/org/mybatis/spring/boot/autoconfigure/MybatisProperties.java
|
https://github.com/mybatis/spring-boot-starter/blob/master/mybatis-spring-boot-autoconfigure/src/main/java/org/mybatis/spring/boot/autoconfigure/MybatisProperties.java
|
Apache-2.0
|
public void setDatabaseId(String databaseId) {
this.databaseId = databaseId;
}
|
Specifies the database identify value for switching query to use.
|
setDatabaseId
|
java
|
mybatis/spring-boot-starter
|
mybatis-spring-boot-autoconfigure/src/main/java/org/mybatis/spring/boot/autoconfigure/MybatisProperties.java
|
https://github.com/mybatis/spring-boot-starter/blob/master/mybatis-spring-boot-autoconfigure/src/main/java/org/mybatis/spring/boot/autoconfigure/MybatisProperties.java
|
Apache-2.0
|
public void applyTo(Configuration target) {
PropertyMapper mapper = PropertyMapper.get().alwaysApplyingWhenNonNull();
mapper.from(getSafeRowBoundsEnabled()).to(target::setSafeRowBoundsEnabled);
mapper.from(getSafeResultHandlerEnabled()).to(target::setSafeResultHandlerEnabled);
mapper.from(getMapUnderscoreToCamelCase()).to(target::setMapUnderscoreToCamelCase);
mapper.from(getAggressiveLazyLoading()).to(target::setAggressiveLazyLoading);
mapper.from(getMultipleResultSetsEnabled()).to(target::setMultipleResultSetsEnabled);
mapper.from(getUseGeneratedKeys()).to(target::setUseGeneratedKeys);
mapper.from(getUseColumnLabel()).to(target::setUseColumnLabel);
mapper.from(getCacheEnabled()).to(target::setCacheEnabled);
mapper.from(getCallSettersOnNulls()).to(target::setCallSettersOnNulls);
mapper.from(getUseActualParamName()).to(target::setUseActualParamName);
mapper.from(getReturnInstanceForEmptyRow()).to(target::setReturnInstanceForEmptyRow);
mapper.from(getShrinkWhitespacesInSql()).to(target::setShrinkWhitespacesInSql);
mapper.from(getNullableOnForEach()).to(target::setNullableOnForEach);
mapper.from(getArgNameBasedConstructorAutoMapping()).to(target::setArgNameBasedConstructorAutoMapping);
mapper.from(getLazyLoadingEnabled()).to(target::setLazyLoadingEnabled);
mapper.from(getLogPrefix()).to(target::setLogPrefix);
mapper.from(getLazyLoadTriggerMethods()).to(target::setLazyLoadTriggerMethods);
mapper.from(getDefaultStatementTimeout()).to(target::setDefaultStatementTimeout);
mapper.from(getDefaultFetchSize()).to(target::setDefaultFetchSize);
mapper.from(getLocalCacheScope()).to(target::setLocalCacheScope);
mapper.from(getJdbcTypeForNull()).to(target::setJdbcTypeForNull);
mapper.from(getDefaultResultSetType()).to(target::setDefaultResultSetType);
mapper.from(getDefaultExecutorType()).to(target::setDefaultExecutorType);
mapper.from(getAutoMappingBehavior()).to(target::setAutoMappingBehavior);
mapper.from(getAutoMappingUnknownColumnBehavior()).to(target::setAutoMappingUnknownColumnBehavior);
mapper.from(getVariables()).to(target::setVariables);
mapper.from(getLogImpl()).to(target::setLogImpl);
mapper.from(getVfsImpl()).to(target::setVfsImpl);
mapper.from(getDefaultSqlProviderType()).to(target::setDefaultSqlProviderType);
mapper.from(getConfigurationFactory()).to(target::setConfigurationFactory);
mapper.from(getDefaultEnumTypeHandler()).to(target::setDefaultEnumTypeHandler);
mapper.from(getDatabaseId()).to(target::setDatabaseId);
}
|
Specifies the database identify value for switching query to use.
|
applyTo
|
java
|
mybatis/spring-boot-starter
|
mybatis-spring-boot-autoconfigure/src/main/java/org/mybatis/spring/boot/autoconfigure/MybatisProperties.java
|
https://github.com/mybatis/spring-boot-starter/blob/master/mybatis-spring-boot-autoconfigure/src/main/java/org/mybatis/spring/boot/autoconfigure/MybatisProperties.java
|
Apache-2.0
|
public static void setUrlDecodingCharset(Charset charset) {
urlDecodingCharset = charset;
}
|
Set the charset for decoding an encoded URL string.
<p>
Default is system default charset.
</p>
@param charset
the charset for decoding an encoded URL string
@since 2.3.0
|
setUrlDecodingCharset
|
java
|
mybatis/spring-boot-starter
|
mybatis-spring-boot-autoconfigure/src/main/java/org/mybatis/spring/boot/autoconfigure/SpringBootVFS.java
|
https://github.com/mybatis/spring-boot-starter/blob/master/mybatis-spring-boot-autoconfigure/src/main/java/org/mybatis/spring/boot/autoconfigure/SpringBootVFS.java
|
Apache-2.0
|
public static void setClassLoaderSupplier(Supplier<ClassLoader> supplier) {
classLoaderSupplier = supplier;
}
|
Set the supplier for providing {@link ClassLoader} to used.
<p>
Default is a returned instance from {@link ClassUtils#getDefaultClassLoader()}.
</p>
@param supplier
the supplier for providing {@link ClassLoader} to used
@since 3.0.2
|
setClassLoaderSupplier
|
java
|
mybatis/spring-boot-starter
|
mybatis-spring-boot-autoconfigure/src/main/java/org/mybatis/spring/boot/autoconfigure/SpringBootVFS.java
|
https://github.com/mybatis/spring-boot-starter/blob/master/mybatis-spring-boot-autoconfigure/src/main/java/org/mybatis/spring/boot/autoconfigure/SpringBootVFS.java
|
Apache-2.0
|
private static String preserveSubpackageName(final String baseUrlString, final Resource resource,
final String rootPath) {
try {
return rootPath + (rootPath.endsWith("/") ? "" : "/")
+ Normalizer
.normalize(URLDecoder.decode(resource.getURL().toString(), urlDecodingCharset), Normalizer.Form.NFC)
.substring(baseUrlString.length());
} catch (IOException e) {
throw new UncheckedIOException(e);
}
}
|
Set the supplier for providing {@link ClassLoader} to used.
<p>
Default is a returned instance from {@link ClassUtils#getDefaultClassLoader()}.
</p>
@param supplier
the supplier for providing {@link ClassLoader} to used
@since 3.0.2
|
preserveSubpackageName
|
java
|
mybatis/spring-boot-starter
|
mybatis-spring-boot-autoconfigure/src/main/java/org/mybatis/spring/boot/autoconfigure/SpringBootVFS.java
|
https://github.com/mybatis/spring-boot-starter/blob/master/mybatis-spring-boot-autoconfigure/src/main/java/org/mybatis/spring/boot/autoconfigure/SpringBootVFS.java
|
Apache-2.0
|
@Test
void testProperties() throws IOException {
DocumentContext documentContext = JsonPath
.parse(new FileSystemResource("src/main/resources/META-INF/additional-spring-configuration-metadata.json")
.getInputStream());
List<Map<String, Object>> properties = documentContext.read("$.properties");
assertAll(() -> assertThat(properties.size()).isEqualTo(4), () -> {
// assert for mybatis.lazy-initialization
Map<String, Object> element = properties.get(0);
assertThat(element.get("defaultValue")).isEqualTo(false);
assertThat(element.get("name")).isEqualTo("mybatis.lazy-initialization");
assertThat(element.get("type")).isEqualTo("java.lang.Boolean");
}, () -> {
// assert for mybatis.mapper-default-scope
Map<String, Object> element = properties.get(1);
assertThat(element.get("defaultValue")).isEqualTo("");
assertThat(element.get("name")).isEqualTo("mybatis.mapper-default-scope");
assertThat(element.get("type")).isEqualTo("java.lang.String");
}, () -> {
// assert for mybatis.inject-sql-session-on-mapper-scan
Map<String, Object> element = properties.get(2);
assertThat(element.get("defaultValue")).isEqualTo(true);
assertThat(element.get("name")).isEqualTo("mybatis.inject-sql-session-on-mapper-scan");
assertThat(element.get("type")).isEqualTo("java.lang.Boolean");
}, () -> {
// assert for mybatis.scripting-language-driver.velocity.userdirective
Map<String, Object> element = properties.get(3);
assertThat(element.get("name")).isEqualTo("mybatis.scripting-language-driver.velocity.userdirective");
@SuppressWarnings("unchecked")
Map<String, Object> deprecation = (Map<String, Object>) element.get("deprecation");
assertThat(deprecation.get("level")).isEqualTo("error");
assertThat(deprecation.get("reason")).isEqualTo(
"The 'userdirective' is deprecated since Velocity 2.x. This property defined for keeping backward compatibility with older velocity version.");
assertThat(deprecation.get("replacement"))
.isEqualTo("mybatis.scripting-language-driver.velocity.velocity-settings.runtime.custom_directives");
});
}
|
Tests for definition of additional-spring-configuration-metadata.json.
@author Kazuki Shimizu
@since 1.3.1
|
testProperties
|
java
|
mybatis/spring-boot-starter
|
mybatis-spring-boot-autoconfigure/src/test/java/org/mybatis/spring/boot/autoconfigure/AdditionalConfigurationMetadataTest.java
|
https://github.com/mybatis/spring-boot-starter/blob/master/mybatis-spring-boot-autoconfigure/src/test/java/org/mybatis/spring/boot/autoconfigure/AdditionalConfigurationMetadataTest.java
|
Apache-2.0
|
void captureOutput() {
this.copy = new ByteArrayOutputStream();
this.captureOut = new CaptureOutputStream(System.out, this.copy);
this.captureErr = new CaptureOutputStream(System.err, this.copy);
System.setOut(new PrintStream(this.captureOut));
System.setErr(new PrintStream(this.captureErr));
}
|
{@code OutputCapture} captures output to {@code System.out} and {@code System.err}.
<p>
To obtain an instance of {@code OutputCapture}, declare a parameter of type {@code OutputCapture} in a JUnit
Jupiter {@code @Test}, {@code @BeforeEach}, or {@code @AfterEach} method.
<p>
{@linkplain #expect Expectations} are supported via Hamcrest matchers.
<p>
To obtain all output to {@code System.out} and {@code System.err}, simply invoke {@link #toString()}.
@author Phillip Webb
@author Andy Wilkinson
@author Sam Brannen
|
captureOutput
|
java
|
mybatis/spring-boot-starter
|
mybatis-spring-boot-samples/mybatis-spring-boot-sample-annotation/src/test/java/extensions/annotation/CaptureSystemOutput.java
|
https://github.com/mybatis/spring-boot-starter/blob/master/mybatis-spring-boot-samples/mybatis-spring-boot-sample-annotation/src/test/java/extensions/annotation/CaptureSystemOutput.java
|
Apache-2.0
|
void releaseOutput() {
System.setOut(this.captureOut.getOriginal());
System.setErr(this.captureErr.getOriginal());
this.copy = null;
}
|
{@code OutputCapture} captures output to {@code System.out} and {@code System.err}.
<p>
To obtain an instance of {@code OutputCapture}, declare a parameter of type {@code OutputCapture} in a JUnit
Jupiter {@code @Test}, {@code @BeforeEach}, or {@code @AfterEach} method.
<p>
{@linkplain #expect Expectations} are supported via Hamcrest matchers.
<p>
To obtain all output to {@code System.out} and {@code System.err}, simply invoke {@link #toString()}.
@author Phillip Webb
@author Andy Wilkinson
@author Sam Brannen
|
releaseOutput
|
java
|
mybatis/spring-boot-starter
|
mybatis-spring-boot-samples/mybatis-spring-boot-sample-annotation/src/test/java/extensions/annotation/CaptureSystemOutput.java
|
https://github.com/mybatis/spring-boot-starter/blob/master/mybatis-spring-boot-samples/mybatis-spring-boot-sample-annotation/src/test/java/extensions/annotation/CaptureSystemOutput.java
|
Apache-2.0
|
private void flush() {
try {
this.captureOut.flush();
this.captureErr.flush();
} catch (IOException ex) {
// ignore
}
}
|
{@code OutputCapture} captures output to {@code System.out} and {@code System.err}.
<p>
To obtain an instance of {@code OutputCapture}, declare a parameter of type {@code OutputCapture} in a JUnit
Jupiter {@code @Test}, {@code @BeforeEach}, or {@code @AfterEach} method.
<p>
{@linkplain #expect Expectations} are supported via Hamcrest matchers.
<p>
To obtain all output to {@code System.out} and {@code System.err}, simply invoke {@link #toString()}.
@author Phillip Webb
@author Andy Wilkinson
@author Sam Brannen
|
flush
|
java
|
mybatis/spring-boot-starter
|
mybatis-spring-boot-samples/mybatis-spring-boot-sample-annotation/src/test/java/extensions/annotation/CaptureSystemOutput.java
|
https://github.com/mybatis/spring-boot-starter/blob/master/mybatis-spring-boot-samples/mybatis-spring-boot-sample-annotation/src/test/java/extensions/annotation/CaptureSystemOutput.java
|
Apache-2.0
|
@Override
public String toString() {
flush();
return this.copy.toString();
}
|
Return all captured output to {@code System.out} and {@code System.err} as a single string.
|
toString
|
java
|
mybatis/spring-boot-starter
|
mybatis-spring-boot-samples/mybatis-spring-boot-sample-annotation/src/test/java/extensions/annotation/CaptureSystemOutput.java
|
https://github.com/mybatis/spring-boot-starter/blob/master/mybatis-spring-boot-samples/mybatis-spring-boot-sample-annotation/src/test/java/extensions/annotation/CaptureSystemOutput.java
|
Apache-2.0
|
void reset() {
this.matchers.clear();
this.copy.reset();
}
|
Return all captured output to {@code System.out} and {@code System.err} as a single string.
|
reset
|
java
|
mybatis/spring-boot-starter
|
mybatis-spring-boot-samples/mybatis-spring-boot-sample-annotation/src/test/java/extensions/annotation/CaptureSystemOutput.java
|
https://github.com/mybatis/spring-boot-starter/blob/master/mybatis-spring-boot-samples/mybatis-spring-boot-sample-annotation/src/test/java/extensions/annotation/CaptureSystemOutput.java
|
Apache-2.0
|
PrintStream getOriginal() {
return this.original;
}
|
Return all captured output to {@code System.out} and {@code System.err} as a single string.
|
getOriginal
|
java
|
mybatis/spring-boot-starter
|
mybatis-spring-boot-samples/mybatis-spring-boot-sample-annotation/src/test/java/extensions/annotation/CaptureSystemOutput.java
|
https://github.com/mybatis/spring-boot-starter/blob/master/mybatis-spring-boot-samples/mybatis-spring-boot-sample-annotation/src/test/java/extensions/annotation/CaptureSystemOutput.java
|
Apache-2.0
|
@Override
public void write(int b) throws IOException {
this.copy.write(b);
this.original.write(b);
this.original.flush();
}
|
Return all captured output to {@code System.out} and {@code System.err} as a single string.
|
write
|
java
|
mybatis/spring-boot-starter
|
mybatis-spring-boot-samples/mybatis-spring-boot-sample-annotation/src/test/java/extensions/annotation/CaptureSystemOutput.java
|
https://github.com/mybatis/spring-boot-starter/blob/master/mybatis-spring-boot-samples/mybatis-spring-boot-sample-annotation/src/test/java/extensions/annotation/CaptureSystemOutput.java
|
Apache-2.0
|
@Override
public void write(byte[] b) throws IOException {
write(b, 0, b.length);
}
|
Return all captured output to {@code System.out} and {@code System.err} as a single string.
|
write
|
java
|
mybatis/spring-boot-starter
|
mybatis-spring-boot-samples/mybatis-spring-boot-sample-annotation/src/test/java/extensions/annotation/CaptureSystemOutput.java
|
https://github.com/mybatis/spring-boot-starter/blob/master/mybatis-spring-boot-samples/mybatis-spring-boot-sample-annotation/src/test/java/extensions/annotation/CaptureSystemOutput.java
|
Apache-2.0
|
@Override
public void write(byte[] b, int off, int len) throws IOException {
this.copy.write(b, off, len);
this.original.write(b, off, len);
}
|
Return all captured output to {@code System.out} and {@code System.err} as a single string.
|
write
|
java
|
mybatis/spring-boot-starter
|
mybatis-spring-boot-samples/mybatis-spring-boot-sample-annotation/src/test/java/extensions/annotation/CaptureSystemOutput.java
|
https://github.com/mybatis/spring-boot-starter/blob/master/mybatis-spring-boot-samples/mybatis-spring-boot-sample-annotation/src/test/java/extensions/annotation/CaptureSystemOutput.java
|
Apache-2.0
|
@Override
public void flush() throws IOException {
this.copy.flush();
this.original.flush();
}
|
Return all captured output to {@code System.out} and {@code System.err} as a single string.
|
flush
|
java
|
mybatis/spring-boot-starter
|
mybatis-spring-boot-samples/mybatis-spring-boot-sample-annotation/src/test/java/extensions/annotation/CaptureSystemOutput.java
|
https://github.com/mybatis/spring-boot-starter/blob/master/mybatis-spring-boot-samples/mybatis-spring-boot-sample-annotation/src/test/java/extensions/annotation/CaptureSystemOutput.java
|
Apache-2.0
|
@Test
void findByStateTest() {
City city = cityMapper.findByState("CA");
assertThat(city.getId()).isEqualTo(1);
assertThat(city.getName()).isEqualTo("San Francisco");
assertThat(city.getState()).isEqualTo("CA");
assertThat(city.getCountry()).isEqualTo("US");
}
|
Tests for {@link CityMapper}.
@author wonwoo
@since 1.2.1
|
findByStateTest
|
java
|
mybatis/spring-boot-starter
|
mybatis-spring-boot-samples/mybatis-spring-boot-sample-annotation/src/test/java/sample/mybatis/annotation/mapper/CityMapperTest.java
|
https://github.com/mybatis/spring-boot-starter/blob/master/mybatis-spring-boot-samples/mybatis-spring-boot-sample-annotation/src/test/java/sample/mybatis/annotation/mapper/CityMapperTest.java
|
Apache-2.0
|
void captureOutput() {
this.copy = new ByteArrayOutputStream();
this.captureOut = new CaptureOutputStream(System.out, this.copy);
this.captureErr = new CaptureOutputStream(System.err, this.copy);
System.setOut(new PrintStream(this.captureOut));
System.setErr(new PrintStream(this.captureErr));
}
|
{@code OutputCapture} captures output to {@code System.out} and {@code System.err}.
<p>
To obtain an instance of {@code OutputCapture}, declare a parameter of type {@code OutputCapture} in a JUnit
Jupiter {@code @Test}, {@code @BeforeEach}, or {@code @AfterEach} method.
<p>
{@linkplain #expect Expectations} are supported via Hamcrest matchers.
<p>
To obtain all output to {@code System.out} and {@code System.err}, simply invoke {@link #toString()}.
@author Phillip Webb
@author Andy Wilkinson
@author Sam Brannen
|
captureOutput
|
java
|
mybatis/spring-boot-starter
|
mybatis-spring-boot-samples/mybatis-spring-boot-sample-freemarker/src/test/java/extensions/freemarker/CaptureSystemOutput.java
|
https://github.com/mybatis/spring-boot-starter/blob/master/mybatis-spring-boot-samples/mybatis-spring-boot-sample-freemarker/src/test/java/extensions/freemarker/CaptureSystemOutput.java
|
Apache-2.0
|
void releaseOutput() {
System.setOut(this.captureOut.getOriginal());
System.setErr(this.captureErr.getOriginal());
this.copy = null;
}
|
{@code OutputCapture} captures output to {@code System.out} and {@code System.err}.
<p>
To obtain an instance of {@code OutputCapture}, declare a parameter of type {@code OutputCapture} in a JUnit
Jupiter {@code @Test}, {@code @BeforeEach}, or {@code @AfterEach} method.
<p>
{@linkplain #expect Expectations} are supported via Hamcrest matchers.
<p>
To obtain all output to {@code System.out} and {@code System.err}, simply invoke {@link #toString()}.
@author Phillip Webb
@author Andy Wilkinson
@author Sam Brannen
|
releaseOutput
|
java
|
mybatis/spring-boot-starter
|
mybatis-spring-boot-samples/mybatis-spring-boot-sample-freemarker/src/test/java/extensions/freemarker/CaptureSystemOutput.java
|
https://github.com/mybatis/spring-boot-starter/blob/master/mybatis-spring-boot-samples/mybatis-spring-boot-sample-freemarker/src/test/java/extensions/freemarker/CaptureSystemOutput.java
|
Apache-2.0
|
private void flush() {
try {
this.captureOut.flush();
this.captureErr.flush();
} catch (IOException ex) {
// ignore
}
}
|
{@code OutputCapture} captures output to {@code System.out} and {@code System.err}.
<p>
To obtain an instance of {@code OutputCapture}, declare a parameter of type {@code OutputCapture} in a JUnit
Jupiter {@code @Test}, {@code @BeforeEach}, or {@code @AfterEach} method.
<p>
{@linkplain #expect Expectations} are supported via Hamcrest matchers.
<p>
To obtain all output to {@code System.out} and {@code System.err}, simply invoke {@link #toString()}.
@author Phillip Webb
@author Andy Wilkinson
@author Sam Brannen
|
flush
|
java
|
mybatis/spring-boot-starter
|
mybatis-spring-boot-samples/mybatis-spring-boot-sample-freemarker/src/test/java/extensions/freemarker/CaptureSystemOutput.java
|
https://github.com/mybatis/spring-boot-starter/blob/master/mybatis-spring-boot-samples/mybatis-spring-boot-sample-freemarker/src/test/java/extensions/freemarker/CaptureSystemOutput.java
|
Apache-2.0
|
@Override
public String toString() {
flush();
return this.copy.toString();
}
|
Return all captured output to {@code System.out} and {@code System.err} as a single string.
|
toString
|
java
|
mybatis/spring-boot-starter
|
mybatis-spring-boot-samples/mybatis-spring-boot-sample-freemarker/src/test/java/extensions/freemarker/CaptureSystemOutput.java
|
https://github.com/mybatis/spring-boot-starter/blob/master/mybatis-spring-boot-samples/mybatis-spring-boot-sample-freemarker/src/test/java/extensions/freemarker/CaptureSystemOutput.java
|
Apache-2.0
|
void reset() {
this.matchers.clear();
this.copy.reset();
}
|
Return all captured output to {@code System.out} and {@code System.err} as a single string.
|
reset
|
java
|
mybatis/spring-boot-starter
|
mybatis-spring-boot-samples/mybatis-spring-boot-sample-freemarker/src/test/java/extensions/freemarker/CaptureSystemOutput.java
|
https://github.com/mybatis/spring-boot-starter/blob/master/mybatis-spring-boot-samples/mybatis-spring-boot-sample-freemarker/src/test/java/extensions/freemarker/CaptureSystemOutput.java
|
Apache-2.0
|
PrintStream getOriginal() {
return this.original;
}
|
Return all captured output to {@code System.out} and {@code System.err} as a single string.
|
getOriginal
|
java
|
mybatis/spring-boot-starter
|
mybatis-spring-boot-samples/mybatis-spring-boot-sample-freemarker/src/test/java/extensions/freemarker/CaptureSystemOutput.java
|
https://github.com/mybatis/spring-boot-starter/blob/master/mybatis-spring-boot-samples/mybatis-spring-boot-sample-freemarker/src/test/java/extensions/freemarker/CaptureSystemOutput.java
|
Apache-2.0
|
@Override
public void write(int b) throws IOException {
this.copy.write(b);
this.original.write(b);
this.original.flush();
}
|
Return all captured output to {@code System.out} and {@code System.err} as a single string.
|
write
|
java
|
mybatis/spring-boot-starter
|
mybatis-spring-boot-samples/mybatis-spring-boot-sample-freemarker/src/test/java/extensions/freemarker/CaptureSystemOutput.java
|
https://github.com/mybatis/spring-boot-starter/blob/master/mybatis-spring-boot-samples/mybatis-spring-boot-sample-freemarker/src/test/java/extensions/freemarker/CaptureSystemOutput.java
|
Apache-2.0
|
@Override
public void write(byte[] b) throws IOException {
write(b, 0, b.length);
}
|
Return all captured output to {@code System.out} and {@code System.err} as a single string.
|
write
|
java
|
mybatis/spring-boot-starter
|
mybatis-spring-boot-samples/mybatis-spring-boot-sample-freemarker/src/test/java/extensions/freemarker/CaptureSystemOutput.java
|
https://github.com/mybatis/spring-boot-starter/blob/master/mybatis-spring-boot-samples/mybatis-spring-boot-sample-freemarker/src/test/java/extensions/freemarker/CaptureSystemOutput.java
|
Apache-2.0
|
@Override
public void write(byte[] b, int off, int len) throws IOException {
this.copy.write(b, off, len);
this.original.write(b, off, len);
}
|
Return all captured output to {@code System.out} and {@code System.err} as a single string.
|
write
|
java
|
mybatis/spring-boot-starter
|
mybatis-spring-boot-samples/mybatis-spring-boot-sample-freemarker/src/test/java/extensions/freemarker/CaptureSystemOutput.java
|
https://github.com/mybatis/spring-boot-starter/blob/master/mybatis-spring-boot-samples/mybatis-spring-boot-sample-freemarker/src/test/java/extensions/freemarker/CaptureSystemOutput.java
|
Apache-2.0
|
@Override
public void flush() throws IOException {
this.copy.flush();
this.original.flush();
}
|
Return all captured output to {@code System.out} and {@code System.err} as a single string.
|
flush
|
java
|
mybatis/spring-boot-starter
|
mybatis-spring-boot-samples/mybatis-spring-boot-sample-freemarker/src/test/java/extensions/freemarker/CaptureSystemOutput.java
|
https://github.com/mybatis/spring-boot-starter/blob/master/mybatis-spring-boot-samples/mybatis-spring-boot-sample-freemarker/src/test/java/extensions/freemarker/CaptureSystemOutput.java
|
Apache-2.0
|
@Test
void findByState() {
City city = cityMapper.findByState("CA");
assertThat(city.getId()).isEqualTo(1);
assertThat(city.getName()).isEqualTo("San Francisco");
assertThat(city.getState()).isEqualTo("CA");
assertThat(city.getCountry()).isEqualTo("US");
}
|
Tests for {@link CityMapper}.
@author Kazuki Shimizu
|
findByState
|
java
|
mybatis/spring-boot-starter
|
mybatis-spring-boot-samples/mybatis-spring-boot-sample-freemarker/src/test/java/sample/mybatis/freemarker/mapper/CityMapperTest.java
|
https://github.com/mybatis/spring-boot-starter/blob/master/mybatis-spring-boot-samples/mybatis-spring-boot-sample-freemarker/src/test/java/sample/mybatis/freemarker/mapper/CityMapperTest.java
|
Apache-2.0
|
@Test
void findById() {
City city = cityMapper.findById(1L);
assertThat(city.getId()).isEqualTo(1);
assertThat(city.getName()).isEqualTo("San Francisco");
assertThat(city.getState()).isEqualTo("CA");
assertThat(city.getCountry()).isEqualTo("US");
}
|
Tests for {@link CityMapper}.
@author Kazuki Shimizu
|
findById
|
java
|
mybatis/spring-boot-starter
|
mybatis-spring-boot-samples/mybatis-spring-boot-sample-freemarker/src/test/java/sample/mybatis/freemarker/mapper/CityMapperTest.java
|
https://github.com/mybatis/spring-boot-starter/blob/master/mybatis-spring-boot-samples/mybatis-spring-boot-sample-freemarker/src/test/java/sample/mybatis/freemarker/mapper/CityMapperTest.java
|
Apache-2.0
|
@Test
void findByName() {
City city = cityMapper.findByName("San Francisco");
assertThat(city.getId()).isEqualTo(1);
assertThat(city.getName()).isEqualTo("San Francisco");
assertThat(city.getState()).isEqualTo("CA");
assertThat(city.getCountry()).isEqualTo("US");
}
|
Tests for {@link CityMapper}.
@author Kazuki Shimizu
|
findByName
|
java
|
mybatis/spring-boot-starter
|
mybatis-spring-boot-samples/mybatis-spring-boot-sample-freemarker/src/test/java/sample/mybatis/freemarker/mapper/CityMapperTest.java
|
https://github.com/mybatis/spring-boot-starter/blob/master/mybatis-spring-boot-samples/mybatis-spring-boot-sample-freemarker/src/test/java/sample/mybatis/freemarker/mapper/CityMapperTest.java
|
Apache-2.0
|
@Test
void findByCountry() {
City city = cityMapper.findByCountry("JP");
assertThat(city.getId()).isEqualTo(2);
assertThat(city.getName()).isEqualTo("Tokyo");
assertThat(city.getState()).isEqualTo("13");
assertThat(city.getCountry()).isEqualTo("JP");
}
|
Tests for {@link CityMapper}.
@author Kazuki Shimizu
|
findByCountry
|
java
|
mybatis/spring-boot-starter
|
mybatis-spring-boot-samples/mybatis-spring-boot-sample-freemarker/src/test/java/sample/mybatis/freemarker/mapper/CityMapperTest.java
|
https://github.com/mybatis/spring-boot-starter/blob/master/mybatis-spring-boot-samples/mybatis-spring-boot-sample-freemarker/src/test/java/sample/mybatis/freemarker/mapper/CityMapperTest.java
|
Apache-2.0
|
void captureOutput() {
this.copy = new ByteArrayOutputStream();
this.captureOut = new CaptureOutputStream(System.out, this.copy);
this.captureErr = new CaptureOutputStream(System.err, this.copy);
System.setOut(new PrintStream(this.captureOut));
System.setErr(new PrintStream(this.captureErr));
}
|
{@code OutputCapture} captures output to {@code System.out} and {@code System.err}.
<p>
To obtain an instance of {@code OutputCapture}, declare a parameter of type {@code OutputCapture} in a JUnit
Jupiter {@code @Test}, {@code @BeforeEach}, or {@code @AfterEach} method.
<p>
{@linkplain #expect Expectations} are supported via Hamcrest matchers.
<p>
To obtain all output to {@code System.out} and {@code System.err}, simply invoke {@link #toString()}.
@author Phillip Webb
@author Andy Wilkinson
@author Sam Brannen
|
captureOutput
|
java
|
mybatis/spring-boot-starter
|
mybatis-spring-boot-samples/mybatis-spring-boot-sample-freemarker-legacy/src/test/java/extensions/freemarker/legacy/CaptureSystemOutput.java
|
https://github.com/mybatis/spring-boot-starter/blob/master/mybatis-spring-boot-samples/mybatis-spring-boot-sample-freemarker-legacy/src/test/java/extensions/freemarker/legacy/CaptureSystemOutput.java
|
Apache-2.0
|
void releaseOutput() {
System.setOut(this.captureOut.getOriginal());
System.setErr(this.captureErr.getOriginal());
this.copy = null;
}
|
{@code OutputCapture} captures output to {@code System.out} and {@code System.err}.
<p>
To obtain an instance of {@code OutputCapture}, declare a parameter of type {@code OutputCapture} in a JUnit
Jupiter {@code @Test}, {@code @BeforeEach}, or {@code @AfterEach} method.
<p>
{@linkplain #expect Expectations} are supported via Hamcrest matchers.
<p>
To obtain all output to {@code System.out} and {@code System.err}, simply invoke {@link #toString()}.
@author Phillip Webb
@author Andy Wilkinson
@author Sam Brannen
|
releaseOutput
|
java
|
mybatis/spring-boot-starter
|
mybatis-spring-boot-samples/mybatis-spring-boot-sample-freemarker-legacy/src/test/java/extensions/freemarker/legacy/CaptureSystemOutput.java
|
https://github.com/mybatis/spring-boot-starter/blob/master/mybatis-spring-boot-samples/mybatis-spring-boot-sample-freemarker-legacy/src/test/java/extensions/freemarker/legacy/CaptureSystemOutput.java
|
Apache-2.0
|
private void flush() {
try {
this.captureOut.flush();
this.captureErr.flush();
} catch (IOException ex) {
// ignore
}
}
|
{@code OutputCapture} captures output to {@code System.out} and {@code System.err}.
<p>
To obtain an instance of {@code OutputCapture}, declare a parameter of type {@code OutputCapture} in a JUnit
Jupiter {@code @Test}, {@code @BeforeEach}, or {@code @AfterEach} method.
<p>
{@linkplain #expect Expectations} are supported via Hamcrest matchers.
<p>
To obtain all output to {@code System.out} and {@code System.err}, simply invoke {@link #toString()}.
@author Phillip Webb
@author Andy Wilkinson
@author Sam Brannen
|
flush
|
java
|
mybatis/spring-boot-starter
|
mybatis-spring-boot-samples/mybatis-spring-boot-sample-freemarker-legacy/src/test/java/extensions/freemarker/legacy/CaptureSystemOutput.java
|
https://github.com/mybatis/spring-boot-starter/blob/master/mybatis-spring-boot-samples/mybatis-spring-boot-sample-freemarker-legacy/src/test/java/extensions/freemarker/legacy/CaptureSystemOutput.java
|
Apache-2.0
|
@Override
public String toString() {
flush();
return this.copy.toString();
}
|
Return all captured output to {@code System.out} and {@code System.err} as a single string.
|
toString
|
java
|
mybatis/spring-boot-starter
|
mybatis-spring-boot-samples/mybatis-spring-boot-sample-freemarker-legacy/src/test/java/extensions/freemarker/legacy/CaptureSystemOutput.java
|
https://github.com/mybatis/spring-boot-starter/blob/master/mybatis-spring-boot-samples/mybatis-spring-boot-sample-freemarker-legacy/src/test/java/extensions/freemarker/legacy/CaptureSystemOutput.java
|
Apache-2.0
|
void reset() {
this.matchers.clear();
this.copy.reset();
}
|
Return all captured output to {@code System.out} and {@code System.err} as a single string.
|
reset
|
java
|
mybatis/spring-boot-starter
|
mybatis-spring-boot-samples/mybatis-spring-boot-sample-freemarker-legacy/src/test/java/extensions/freemarker/legacy/CaptureSystemOutput.java
|
https://github.com/mybatis/spring-boot-starter/blob/master/mybatis-spring-boot-samples/mybatis-spring-boot-sample-freemarker-legacy/src/test/java/extensions/freemarker/legacy/CaptureSystemOutput.java
|
Apache-2.0
|
PrintStream getOriginal() {
return this.original;
}
|
Return all captured output to {@code System.out} and {@code System.err} as a single string.
|
getOriginal
|
java
|
mybatis/spring-boot-starter
|
mybatis-spring-boot-samples/mybatis-spring-boot-sample-freemarker-legacy/src/test/java/extensions/freemarker/legacy/CaptureSystemOutput.java
|
https://github.com/mybatis/spring-boot-starter/blob/master/mybatis-spring-boot-samples/mybatis-spring-boot-sample-freemarker-legacy/src/test/java/extensions/freemarker/legacy/CaptureSystemOutput.java
|
Apache-2.0
|
@Override
public void write(int b) throws IOException {
this.copy.write(b);
this.original.write(b);
this.original.flush();
}
|
Return all captured output to {@code System.out} and {@code System.err} as a single string.
|
write
|
java
|
mybatis/spring-boot-starter
|
mybatis-spring-boot-samples/mybatis-spring-boot-sample-freemarker-legacy/src/test/java/extensions/freemarker/legacy/CaptureSystemOutput.java
|
https://github.com/mybatis/spring-boot-starter/blob/master/mybatis-spring-boot-samples/mybatis-spring-boot-sample-freemarker-legacy/src/test/java/extensions/freemarker/legacy/CaptureSystemOutput.java
|
Apache-2.0
|
@Override
public void write(byte[] b) throws IOException {
write(b, 0, b.length);
}
|
Return all captured output to {@code System.out} and {@code System.err} as a single string.
|
write
|
java
|
mybatis/spring-boot-starter
|
mybatis-spring-boot-samples/mybatis-spring-boot-sample-freemarker-legacy/src/test/java/extensions/freemarker/legacy/CaptureSystemOutput.java
|
https://github.com/mybatis/spring-boot-starter/blob/master/mybatis-spring-boot-samples/mybatis-spring-boot-sample-freemarker-legacy/src/test/java/extensions/freemarker/legacy/CaptureSystemOutput.java
|
Apache-2.0
|
@Override
public void write(byte[] b, int off, int len) throws IOException {
this.copy.write(b, off, len);
this.original.write(b, off, len);
}
|
Return all captured output to {@code System.out} and {@code System.err} as a single string.
|
write
|
java
|
mybatis/spring-boot-starter
|
mybatis-spring-boot-samples/mybatis-spring-boot-sample-freemarker-legacy/src/test/java/extensions/freemarker/legacy/CaptureSystemOutput.java
|
https://github.com/mybatis/spring-boot-starter/blob/master/mybatis-spring-boot-samples/mybatis-spring-boot-sample-freemarker-legacy/src/test/java/extensions/freemarker/legacy/CaptureSystemOutput.java
|
Apache-2.0
|
@Override
public void flush() throws IOException {
this.copy.flush();
this.original.flush();
}
|
Return all captured output to {@code System.out} and {@code System.err} as a single string.
|
flush
|
java
|
mybatis/spring-boot-starter
|
mybatis-spring-boot-samples/mybatis-spring-boot-sample-freemarker-legacy/src/test/java/extensions/freemarker/legacy/CaptureSystemOutput.java
|
https://github.com/mybatis/spring-boot-starter/blob/master/mybatis-spring-boot-samples/mybatis-spring-boot-sample-freemarker-legacy/src/test/java/extensions/freemarker/legacy/CaptureSystemOutput.java
|
Apache-2.0
|
@Test
void findByState() {
City city = cityMapper.findByState("CA");
assertThat(city.getId()).isEqualTo(1);
assertThat(city.getName()).isEqualTo("San Francisco");
assertThat(city.getState()).isEqualTo("CA");
assertThat(city.getCountry()).isEqualTo("US");
}
|
Tests for {@link CityMapper}.
@author Kazuki Shimizu
|
findByState
|
java
|
mybatis/spring-boot-starter
|
mybatis-spring-boot-samples/mybatis-spring-boot-sample-freemarker-legacy/src/test/java/sample/mybatis/freemarker/legacy/mapper/CityMapperTest.java
|
https://github.com/mybatis/spring-boot-starter/blob/master/mybatis-spring-boot-samples/mybatis-spring-boot-sample-freemarker-legacy/src/test/java/sample/mybatis/freemarker/legacy/mapper/CityMapperTest.java
|
Apache-2.0
|
@Test
void findById() {
City city = cityMapper.findById(1L);
assertThat(city.getId()).isEqualTo(1);
assertThat(city.getName()).isEqualTo("San Francisco");
assertThat(city.getState()).isEqualTo("CA");
assertThat(city.getCountry()).isEqualTo("US");
}
|
Tests for {@link CityMapper}.
@author Kazuki Shimizu
|
findById
|
java
|
mybatis/spring-boot-starter
|
mybatis-spring-boot-samples/mybatis-spring-boot-sample-freemarker-legacy/src/test/java/sample/mybatis/freemarker/legacy/mapper/CityMapperTest.java
|
https://github.com/mybatis/spring-boot-starter/blob/master/mybatis-spring-boot-samples/mybatis-spring-boot-sample-freemarker-legacy/src/test/java/sample/mybatis/freemarker/legacy/mapper/CityMapperTest.java
|
Apache-2.0
|
@Test
void findByName() {
City city = cityMapper.findByName("San Francisco");
assertThat(city.getId()).isEqualTo(1);
assertThat(city.getName()).isEqualTo("San Francisco");
assertThat(city.getState()).isEqualTo("CA");
assertThat(city.getCountry()).isEqualTo("US");
}
|
Tests for {@link CityMapper}.
@author Kazuki Shimizu
|
findByName
|
java
|
mybatis/spring-boot-starter
|
mybatis-spring-boot-samples/mybatis-spring-boot-sample-freemarker-legacy/src/test/java/sample/mybatis/freemarker/legacy/mapper/CityMapperTest.java
|
https://github.com/mybatis/spring-boot-starter/blob/master/mybatis-spring-boot-samples/mybatis-spring-boot-sample-freemarker-legacy/src/test/java/sample/mybatis/freemarker/legacy/mapper/CityMapperTest.java
|
Apache-2.0
|
void captureOutput() {
this.copy = new ByteArrayOutputStream();
this.captureOut = new CaptureOutputStream(System.out, this.copy);
this.captureErr = new CaptureOutputStream(System.err, this.copy);
System.setOut(new PrintStream(this.captureOut));
System.setErr(new PrintStream(this.captureErr));
}
|
{@code OutputCapture} captures output to {@code System.out} and {@code System.err}.
<p>
To obtain an instance of {@code OutputCapture}, declare a parameter of type {@code OutputCapture} in a JUnit
Jupiter {@code @Test}, {@code @BeforeEach}, or {@code @AfterEach} method.
<p>
{@linkplain #expect Expectations} are supported via Hamcrest matchers.
<p>
To obtain all output to {@code System.out} and {@code System.err}, simply invoke {@link #toString()}.
@author Phillip Webb
@author Andy Wilkinson
@author Sam Brannen
|
captureOutput
|
java
|
mybatis/spring-boot-starter
|
mybatis-spring-boot-samples/mybatis-spring-boot-sample-kotlin/src/test/kotlin/extensions/kotlin/CaptureSystemOutput.java
|
https://github.com/mybatis/spring-boot-starter/blob/master/mybatis-spring-boot-samples/mybatis-spring-boot-sample-kotlin/src/test/kotlin/extensions/kotlin/CaptureSystemOutput.java
|
Apache-2.0
|
void releaseOutput() {
System.setOut(this.captureOut.getOriginal());
System.setErr(this.captureErr.getOriginal());
this.copy = null;
}
|
{@code OutputCapture} captures output to {@code System.out} and {@code System.err}.
<p>
To obtain an instance of {@code OutputCapture}, declare a parameter of type {@code OutputCapture} in a JUnit
Jupiter {@code @Test}, {@code @BeforeEach}, or {@code @AfterEach} method.
<p>
{@linkplain #expect Expectations} are supported via Hamcrest matchers.
<p>
To obtain all output to {@code System.out} and {@code System.err}, simply invoke {@link #toString()}.
@author Phillip Webb
@author Andy Wilkinson
@author Sam Brannen
|
releaseOutput
|
java
|
mybatis/spring-boot-starter
|
mybatis-spring-boot-samples/mybatis-spring-boot-sample-kotlin/src/test/kotlin/extensions/kotlin/CaptureSystemOutput.java
|
https://github.com/mybatis/spring-boot-starter/blob/master/mybatis-spring-boot-samples/mybatis-spring-boot-sample-kotlin/src/test/kotlin/extensions/kotlin/CaptureSystemOutput.java
|
Apache-2.0
|
private void flush() {
try {
this.captureOut.flush();
this.captureErr.flush();
} catch (IOException ex) {
// ignore
}
}
|
{@code OutputCapture} captures output to {@code System.out} and {@code System.err}.
<p>
To obtain an instance of {@code OutputCapture}, declare a parameter of type {@code OutputCapture} in a JUnit
Jupiter {@code @Test}, {@code @BeforeEach}, or {@code @AfterEach} method.
<p>
{@linkplain #expect Expectations} are supported via Hamcrest matchers.
<p>
To obtain all output to {@code System.out} and {@code System.err}, simply invoke {@link #toString()}.
@author Phillip Webb
@author Andy Wilkinson
@author Sam Brannen
|
flush
|
java
|
mybatis/spring-boot-starter
|
mybatis-spring-boot-samples/mybatis-spring-boot-sample-kotlin/src/test/kotlin/extensions/kotlin/CaptureSystemOutput.java
|
https://github.com/mybatis/spring-boot-starter/blob/master/mybatis-spring-boot-samples/mybatis-spring-boot-sample-kotlin/src/test/kotlin/extensions/kotlin/CaptureSystemOutput.java
|
Apache-2.0
|
@Override
public String toString() {
flush();
return this.copy.toString();
}
|
Return all captured output to {@code System.out} and {@code System.err} as a single string.
|
toString
|
java
|
mybatis/spring-boot-starter
|
mybatis-spring-boot-samples/mybatis-spring-boot-sample-kotlin/src/test/kotlin/extensions/kotlin/CaptureSystemOutput.java
|
https://github.com/mybatis/spring-boot-starter/blob/master/mybatis-spring-boot-samples/mybatis-spring-boot-sample-kotlin/src/test/kotlin/extensions/kotlin/CaptureSystemOutput.java
|
Apache-2.0
|
void reset() {
this.matchers.clear();
this.copy.reset();
}
|
Return all captured output to {@code System.out} and {@code System.err} as a single string.
|
reset
|
java
|
mybatis/spring-boot-starter
|
mybatis-spring-boot-samples/mybatis-spring-boot-sample-kotlin/src/test/kotlin/extensions/kotlin/CaptureSystemOutput.java
|
https://github.com/mybatis/spring-boot-starter/blob/master/mybatis-spring-boot-samples/mybatis-spring-boot-sample-kotlin/src/test/kotlin/extensions/kotlin/CaptureSystemOutput.java
|
Apache-2.0
|
PrintStream getOriginal() {
return this.original;
}
|
Return all captured output to {@code System.out} and {@code System.err} as a single string.
|
getOriginal
|
java
|
mybatis/spring-boot-starter
|
mybatis-spring-boot-samples/mybatis-spring-boot-sample-kotlin/src/test/kotlin/extensions/kotlin/CaptureSystemOutput.java
|
https://github.com/mybatis/spring-boot-starter/blob/master/mybatis-spring-boot-samples/mybatis-spring-boot-sample-kotlin/src/test/kotlin/extensions/kotlin/CaptureSystemOutput.java
|
Apache-2.0
|
@Override
public void write(int b) throws IOException {
this.copy.write(b);
this.original.write(b);
this.original.flush();
}
|
Return all captured output to {@code System.out} and {@code System.err} as a single string.
|
write
|
java
|
mybatis/spring-boot-starter
|
mybatis-spring-boot-samples/mybatis-spring-boot-sample-kotlin/src/test/kotlin/extensions/kotlin/CaptureSystemOutput.java
|
https://github.com/mybatis/spring-boot-starter/blob/master/mybatis-spring-boot-samples/mybatis-spring-boot-sample-kotlin/src/test/kotlin/extensions/kotlin/CaptureSystemOutput.java
|
Apache-2.0
|
@Override
public void write(byte[] b) throws IOException {
write(b, 0, b.length);
}
|
Return all captured output to {@code System.out} and {@code System.err} as a single string.
|
write
|
java
|
mybatis/spring-boot-starter
|
mybatis-spring-boot-samples/mybatis-spring-boot-sample-kotlin/src/test/kotlin/extensions/kotlin/CaptureSystemOutput.java
|
https://github.com/mybatis/spring-boot-starter/blob/master/mybatis-spring-boot-samples/mybatis-spring-boot-sample-kotlin/src/test/kotlin/extensions/kotlin/CaptureSystemOutput.java
|
Apache-2.0
|
@Override
public void write(byte[] b, int off, int len) throws IOException {
this.copy.write(b, off, len);
this.original.write(b, off, len);
}
|
Return all captured output to {@code System.out} and {@code System.err} as a single string.
|
write
|
java
|
mybatis/spring-boot-starter
|
mybatis-spring-boot-samples/mybatis-spring-boot-sample-kotlin/src/test/kotlin/extensions/kotlin/CaptureSystemOutput.java
|
https://github.com/mybatis/spring-boot-starter/blob/master/mybatis-spring-boot-samples/mybatis-spring-boot-sample-kotlin/src/test/kotlin/extensions/kotlin/CaptureSystemOutput.java
|
Apache-2.0
|
@Override
public void flush() throws IOException {
this.copy.flush();
this.original.flush();
}
|
Return all captured output to {@code System.out} and {@code System.err} as a single string.
|
flush
|
java
|
mybatis/spring-boot-starter
|
mybatis-spring-boot-samples/mybatis-spring-boot-sample-kotlin/src/test/kotlin/extensions/kotlin/CaptureSystemOutput.java
|
https://github.com/mybatis/spring-boot-starter/blob/master/mybatis-spring-boot-samples/mybatis-spring-boot-sample-kotlin/src/test/kotlin/extensions/kotlin/CaptureSystemOutput.java
|
Apache-2.0
|
void captureOutput() {
this.copy = new ByteArrayOutputStream();
this.captureOut = new CaptureOutputStream(System.out, this.copy);
this.captureErr = new CaptureOutputStream(System.err, this.copy);
System.setOut(new PrintStream(this.captureOut));
System.setErr(new PrintStream(this.captureErr));
}
|
{@code OutputCapture} captures output to {@code System.out} and {@code System.err}.
<p>
To obtain an instance of {@code OutputCapture}, declare a parameter of type {@code OutputCapture} in a JUnit
Jupiter {@code @Test}, {@code @BeforeEach}, or {@code @AfterEach} method.
<p>
{@linkplain #expect Expectations} are supported via Hamcrest matchers.
<p>
To obtain all output to {@code System.out} and {@code System.err}, simply invoke {@link #toString()}.
@author Phillip Webb
@author Andy Wilkinson
@author Sam Brannen
|
captureOutput
|
java
|
mybatis/spring-boot-starter
|
mybatis-spring-boot-samples/mybatis-spring-boot-sample-thymeleaf/src/test/java/extensions/thymeleaf/CaptureSystemOutput.java
|
https://github.com/mybatis/spring-boot-starter/blob/master/mybatis-spring-boot-samples/mybatis-spring-boot-sample-thymeleaf/src/test/java/extensions/thymeleaf/CaptureSystemOutput.java
|
Apache-2.0
|
void releaseOutput() {
System.setOut(this.captureOut.getOriginal());
System.setErr(this.captureErr.getOriginal());
this.copy = null;
}
|
{@code OutputCapture} captures output to {@code System.out} and {@code System.err}.
<p>
To obtain an instance of {@code OutputCapture}, declare a parameter of type {@code OutputCapture} in a JUnit
Jupiter {@code @Test}, {@code @BeforeEach}, or {@code @AfterEach} method.
<p>
{@linkplain #expect Expectations} are supported via Hamcrest matchers.
<p>
To obtain all output to {@code System.out} and {@code System.err}, simply invoke {@link #toString()}.
@author Phillip Webb
@author Andy Wilkinson
@author Sam Brannen
|
releaseOutput
|
java
|
mybatis/spring-boot-starter
|
mybatis-spring-boot-samples/mybatis-spring-boot-sample-thymeleaf/src/test/java/extensions/thymeleaf/CaptureSystemOutput.java
|
https://github.com/mybatis/spring-boot-starter/blob/master/mybatis-spring-boot-samples/mybatis-spring-boot-sample-thymeleaf/src/test/java/extensions/thymeleaf/CaptureSystemOutput.java
|
Apache-2.0
|
private void flush() {
try {
this.captureOut.flush();
this.captureErr.flush();
} catch (IOException ex) {
// ignore
}
}
|
{@code OutputCapture} captures output to {@code System.out} and {@code System.err}.
<p>
To obtain an instance of {@code OutputCapture}, declare a parameter of type {@code OutputCapture} in a JUnit
Jupiter {@code @Test}, {@code @BeforeEach}, or {@code @AfterEach} method.
<p>
{@linkplain #expect Expectations} are supported via Hamcrest matchers.
<p>
To obtain all output to {@code System.out} and {@code System.err}, simply invoke {@link #toString()}.
@author Phillip Webb
@author Andy Wilkinson
@author Sam Brannen
|
flush
|
java
|
mybatis/spring-boot-starter
|
mybatis-spring-boot-samples/mybatis-spring-boot-sample-thymeleaf/src/test/java/extensions/thymeleaf/CaptureSystemOutput.java
|
https://github.com/mybatis/spring-boot-starter/blob/master/mybatis-spring-boot-samples/mybatis-spring-boot-sample-thymeleaf/src/test/java/extensions/thymeleaf/CaptureSystemOutput.java
|
Apache-2.0
|
@Override
public String toString() {
flush();
return this.copy.toString();
}
|
Return all captured output to {@code System.out} and {@code System.err} as a single string.
|
toString
|
java
|
mybatis/spring-boot-starter
|
mybatis-spring-boot-samples/mybatis-spring-boot-sample-thymeleaf/src/test/java/extensions/thymeleaf/CaptureSystemOutput.java
|
https://github.com/mybatis/spring-boot-starter/blob/master/mybatis-spring-boot-samples/mybatis-spring-boot-sample-thymeleaf/src/test/java/extensions/thymeleaf/CaptureSystemOutput.java
|
Apache-2.0
|
void reset() {
this.matchers.clear();
this.copy.reset();
}
|
Return all captured output to {@code System.out} and {@code System.err} as a single string.
|
reset
|
java
|
mybatis/spring-boot-starter
|
mybatis-spring-boot-samples/mybatis-spring-boot-sample-thymeleaf/src/test/java/extensions/thymeleaf/CaptureSystemOutput.java
|
https://github.com/mybatis/spring-boot-starter/blob/master/mybatis-spring-boot-samples/mybatis-spring-boot-sample-thymeleaf/src/test/java/extensions/thymeleaf/CaptureSystemOutput.java
|
Apache-2.0
|
PrintStream getOriginal() {
return this.original;
}
|
Return all captured output to {@code System.out} and {@code System.err} as a single string.
|
getOriginal
|
java
|
mybatis/spring-boot-starter
|
mybatis-spring-boot-samples/mybatis-spring-boot-sample-thymeleaf/src/test/java/extensions/thymeleaf/CaptureSystemOutput.java
|
https://github.com/mybatis/spring-boot-starter/blob/master/mybatis-spring-boot-samples/mybatis-spring-boot-sample-thymeleaf/src/test/java/extensions/thymeleaf/CaptureSystemOutput.java
|
Apache-2.0
|
@Override
public void write(int b) throws IOException {
this.copy.write(b);
this.original.write(b);
this.original.flush();
}
|
Return all captured output to {@code System.out} and {@code System.err} as a single string.
|
write
|
java
|
mybatis/spring-boot-starter
|
mybatis-spring-boot-samples/mybatis-spring-boot-sample-thymeleaf/src/test/java/extensions/thymeleaf/CaptureSystemOutput.java
|
https://github.com/mybatis/spring-boot-starter/blob/master/mybatis-spring-boot-samples/mybatis-spring-boot-sample-thymeleaf/src/test/java/extensions/thymeleaf/CaptureSystemOutput.java
|
Apache-2.0
|
@Override
public void write(byte[] b) throws IOException {
write(b, 0, b.length);
}
|
Return all captured output to {@code System.out} and {@code System.err} as a single string.
|
write
|
java
|
mybatis/spring-boot-starter
|
mybatis-spring-boot-samples/mybatis-spring-boot-sample-thymeleaf/src/test/java/extensions/thymeleaf/CaptureSystemOutput.java
|
https://github.com/mybatis/spring-boot-starter/blob/master/mybatis-spring-boot-samples/mybatis-spring-boot-sample-thymeleaf/src/test/java/extensions/thymeleaf/CaptureSystemOutput.java
|
Apache-2.0
|
@Override
public void write(byte[] b, int off, int len) throws IOException {
this.copy.write(b, off, len);
this.original.write(b, off, len);
}
|
Return all captured output to {@code System.out} and {@code System.err} as a single string.
|
write
|
java
|
mybatis/spring-boot-starter
|
mybatis-spring-boot-samples/mybatis-spring-boot-sample-thymeleaf/src/test/java/extensions/thymeleaf/CaptureSystemOutput.java
|
https://github.com/mybatis/spring-boot-starter/blob/master/mybatis-spring-boot-samples/mybatis-spring-boot-sample-thymeleaf/src/test/java/extensions/thymeleaf/CaptureSystemOutput.java
|
Apache-2.0
|
@Override
public void flush() throws IOException {
this.copy.flush();
this.original.flush();
}
|
Return all captured output to {@code System.out} and {@code System.err} as a single string.
|
flush
|
java
|
mybatis/spring-boot-starter
|
mybatis-spring-boot-samples/mybatis-spring-boot-sample-thymeleaf/src/test/java/extensions/thymeleaf/CaptureSystemOutput.java
|
https://github.com/mybatis/spring-boot-starter/blob/master/mybatis-spring-boot-samples/mybatis-spring-boot-sample-thymeleaf/src/test/java/extensions/thymeleaf/CaptureSystemOutput.java
|
Apache-2.0
|
@Test
void findByState() {
City city = cityMapper.findByState("CA");
assertThat(city.getId()).isEqualTo(1);
assertThat(city.getName()).isEqualTo("San Francisco");
assertThat(city.getState()).isEqualTo("CA");
assertThat(city.getCountry()).isEqualTo("US");
}
|
Tests for {@link CityMapper}.
@author Kazuki Shimizu
|
findByState
|
java
|
mybatis/spring-boot-starter
|
mybatis-spring-boot-samples/mybatis-spring-boot-sample-thymeleaf/src/test/java/sample/mybatis/thymeleaf/mapper/CityMapperTest.java
|
https://github.com/mybatis/spring-boot-starter/blob/master/mybatis-spring-boot-samples/mybatis-spring-boot-sample-thymeleaf/src/test/java/sample/mybatis/thymeleaf/mapper/CityMapperTest.java
|
Apache-2.0
|
@Test
void findById() {
City city = cityMapper.findById(1L);
assertThat(city.getId()).isEqualTo(1);
assertThat(city.getName()).isEqualTo("San Francisco");
assertThat(city.getState()).isEqualTo("CA");
assertThat(city.getCountry()).isEqualTo("US");
}
|
Tests for {@link CityMapper}.
@author Kazuki Shimizu
|
findById
|
java
|
mybatis/spring-boot-starter
|
mybatis-spring-boot-samples/mybatis-spring-boot-sample-thymeleaf/src/test/java/sample/mybatis/thymeleaf/mapper/CityMapperTest.java
|
https://github.com/mybatis/spring-boot-starter/blob/master/mybatis-spring-boot-samples/mybatis-spring-boot-sample-thymeleaf/src/test/java/sample/mybatis/thymeleaf/mapper/CityMapperTest.java
|
Apache-2.0
|
@Test
void findByName() {
City city = cityMapper.findByName("San Francisco");
assertThat(city.getId()).isEqualTo(1);
assertThat(city.getName()).isEqualTo("San Francisco");
assertThat(city.getState()).isEqualTo("CA");
assertThat(city.getCountry()).isEqualTo("US");
}
|
Tests for {@link CityMapper}.
@author Kazuki Shimizu
|
findByName
|
java
|
mybatis/spring-boot-starter
|
mybatis-spring-boot-samples/mybatis-spring-boot-sample-thymeleaf/src/test/java/sample/mybatis/thymeleaf/mapper/CityMapperTest.java
|
https://github.com/mybatis/spring-boot-starter/blob/master/mybatis-spring-boot-samples/mybatis-spring-boot-sample-thymeleaf/src/test/java/sample/mybatis/thymeleaf/mapper/CityMapperTest.java
|
Apache-2.0
|
@Test
void findByCountry() {
City city = cityMapper.findByCountry("JP");
assertThat(city.getId()).isEqualTo(2);
assertThat(city.getName()).isEqualTo("Tokyo");
assertThat(city.getState()).isEqualTo("13");
assertThat(city.getCountry()).isEqualTo("JP");
}
|
Tests for {@link CityMapper}.
@author Kazuki Shimizu
|
findByCountry
|
java
|
mybatis/spring-boot-starter
|
mybatis-spring-boot-samples/mybatis-spring-boot-sample-thymeleaf/src/test/java/sample/mybatis/thymeleaf/mapper/CityMapperTest.java
|
https://github.com/mybatis/spring-boot-starter/blob/master/mybatis-spring-boot-samples/mybatis-spring-boot-sample-thymeleaf/src/test/java/sample/mybatis/thymeleaf/mapper/CityMapperTest.java
|
Apache-2.0
|
void captureOutput() {
this.copy = new ByteArrayOutputStream();
this.captureOut = new CaptureOutputStream(System.out, this.copy);
this.captureErr = new CaptureOutputStream(System.err, this.copy);
System.setOut(new PrintStream(this.captureOut));
System.setErr(new PrintStream(this.captureErr));
}
|
{@code OutputCapture} captures output to {@code System.out} and {@code System.err}.
<p>
To obtain an instance of {@code OutputCapture}, declare a parameter of type {@code OutputCapture} in a JUnit
Jupiter {@code @Test}, {@code @BeforeEach}, or {@code @AfterEach} method.
<p>
{@linkplain #expect Expectations} are supported via Hamcrest matchers.
<p>
To obtain all output to {@code System.out} and {@code System.err}, simply invoke {@link #toString()}.
@author Phillip Webb
@author Andy Wilkinson
@author Sam Brannen
|
captureOutput
|
java
|
mybatis/spring-boot-starter
|
mybatis-spring-boot-samples/mybatis-spring-boot-sample-velocity/src/test/java/extensions/velocity/CaptureSystemOutput.java
|
https://github.com/mybatis/spring-boot-starter/blob/master/mybatis-spring-boot-samples/mybatis-spring-boot-sample-velocity/src/test/java/extensions/velocity/CaptureSystemOutput.java
|
Apache-2.0
|
void releaseOutput() {
System.setOut(this.captureOut.getOriginal());
System.setErr(this.captureErr.getOriginal());
this.copy = null;
}
|
{@code OutputCapture} captures output to {@code System.out} and {@code System.err}.
<p>
To obtain an instance of {@code OutputCapture}, declare a parameter of type {@code OutputCapture} in a JUnit
Jupiter {@code @Test}, {@code @BeforeEach}, or {@code @AfterEach} method.
<p>
{@linkplain #expect Expectations} are supported via Hamcrest matchers.
<p>
To obtain all output to {@code System.out} and {@code System.err}, simply invoke {@link #toString()}.
@author Phillip Webb
@author Andy Wilkinson
@author Sam Brannen
|
releaseOutput
|
java
|
mybatis/spring-boot-starter
|
mybatis-spring-boot-samples/mybatis-spring-boot-sample-velocity/src/test/java/extensions/velocity/CaptureSystemOutput.java
|
https://github.com/mybatis/spring-boot-starter/blob/master/mybatis-spring-boot-samples/mybatis-spring-boot-sample-velocity/src/test/java/extensions/velocity/CaptureSystemOutput.java
|
Apache-2.0
|
private void flush() {
try {
this.captureOut.flush();
this.captureErr.flush();
} catch (IOException ex) {
// ignore
}
}
|
{@code OutputCapture} captures output to {@code System.out} and {@code System.err}.
<p>
To obtain an instance of {@code OutputCapture}, declare a parameter of type {@code OutputCapture} in a JUnit
Jupiter {@code @Test}, {@code @BeforeEach}, or {@code @AfterEach} method.
<p>
{@linkplain #expect Expectations} are supported via Hamcrest matchers.
<p>
To obtain all output to {@code System.out} and {@code System.err}, simply invoke {@link #toString()}.
@author Phillip Webb
@author Andy Wilkinson
@author Sam Brannen
|
flush
|
java
|
mybatis/spring-boot-starter
|
mybatis-spring-boot-samples/mybatis-spring-boot-sample-velocity/src/test/java/extensions/velocity/CaptureSystemOutput.java
|
https://github.com/mybatis/spring-boot-starter/blob/master/mybatis-spring-boot-samples/mybatis-spring-boot-sample-velocity/src/test/java/extensions/velocity/CaptureSystemOutput.java
|
Apache-2.0
|
@Override
public String toString() {
flush();
return this.copy.toString();
}
|
Return all captured output to {@code System.out} and {@code System.err} as a single string.
|
toString
|
java
|
mybatis/spring-boot-starter
|
mybatis-spring-boot-samples/mybatis-spring-boot-sample-velocity/src/test/java/extensions/velocity/CaptureSystemOutput.java
|
https://github.com/mybatis/spring-boot-starter/blob/master/mybatis-spring-boot-samples/mybatis-spring-boot-sample-velocity/src/test/java/extensions/velocity/CaptureSystemOutput.java
|
Apache-2.0
|
void reset() {
this.matchers.clear();
this.copy.reset();
}
|
Return all captured output to {@code System.out} and {@code System.err} as a single string.
|
reset
|
java
|
mybatis/spring-boot-starter
|
mybatis-spring-boot-samples/mybatis-spring-boot-sample-velocity/src/test/java/extensions/velocity/CaptureSystemOutput.java
|
https://github.com/mybatis/spring-boot-starter/blob/master/mybatis-spring-boot-samples/mybatis-spring-boot-sample-velocity/src/test/java/extensions/velocity/CaptureSystemOutput.java
|
Apache-2.0
|
PrintStream getOriginal() {
return this.original;
}
|
Return all captured output to {@code System.out} and {@code System.err} as a single string.
|
getOriginal
|
java
|
mybatis/spring-boot-starter
|
mybatis-spring-boot-samples/mybatis-spring-boot-sample-velocity/src/test/java/extensions/velocity/CaptureSystemOutput.java
|
https://github.com/mybatis/spring-boot-starter/blob/master/mybatis-spring-boot-samples/mybatis-spring-boot-sample-velocity/src/test/java/extensions/velocity/CaptureSystemOutput.java
|
Apache-2.0
|
@Override
public void write(int b) throws IOException {
this.copy.write(b);
this.original.write(b);
this.original.flush();
}
|
Return all captured output to {@code System.out} and {@code System.err} as a single string.
|
write
|
java
|
mybatis/spring-boot-starter
|
mybatis-spring-boot-samples/mybatis-spring-boot-sample-velocity/src/test/java/extensions/velocity/CaptureSystemOutput.java
|
https://github.com/mybatis/spring-boot-starter/blob/master/mybatis-spring-boot-samples/mybatis-spring-boot-sample-velocity/src/test/java/extensions/velocity/CaptureSystemOutput.java
|
Apache-2.0
|
@Override
public void write(byte[] b) throws IOException {
write(b, 0, b.length);
}
|
Return all captured output to {@code System.out} and {@code System.err} as a single string.
|
write
|
java
|
mybatis/spring-boot-starter
|
mybatis-spring-boot-samples/mybatis-spring-boot-sample-velocity/src/test/java/extensions/velocity/CaptureSystemOutput.java
|
https://github.com/mybatis/spring-boot-starter/blob/master/mybatis-spring-boot-samples/mybatis-spring-boot-sample-velocity/src/test/java/extensions/velocity/CaptureSystemOutput.java
|
Apache-2.0
|
@Override
public void write(byte[] b, int off, int len) throws IOException {
this.copy.write(b, off, len);
this.original.write(b, off, len);
}
|
Return all captured output to {@code System.out} and {@code System.err} as a single string.
|
write
|
java
|
mybatis/spring-boot-starter
|
mybatis-spring-boot-samples/mybatis-spring-boot-sample-velocity/src/test/java/extensions/velocity/CaptureSystemOutput.java
|
https://github.com/mybatis/spring-boot-starter/blob/master/mybatis-spring-boot-samples/mybatis-spring-boot-sample-velocity/src/test/java/extensions/velocity/CaptureSystemOutput.java
|
Apache-2.0
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.