本文整理汇总了Java中jetbrains.buildServer.dotNet.buildRunner.agent.TextParser.parse方法的典型用法代码示例。如果您正苦于以下问题:Java TextParser.parse方法的具体用法?Java TextParser.parse怎么用?Java TextParser.parse使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类jetbrains.buildServer.dotNet.buildRunner.agent.TextParser
的用法示例。
在下文中一共展示了TextParser.parse方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: shouldParseAcl
import jetbrains.buildServer.dotNet.buildRunner.agent.TextParser; //导入方法依赖的package包/类
@Test(dataProvider = "parseAclCases")
public void shouldParseAcl(
@NotNull final String aclStr,
@Nullable final AccessControlList expectedAcl,
final boolean expectedThrowException) throws ExecutionException {
// Given
final TextParser<AccessControlList> instance = createInstance();
boolean actualThrowException = false;
AccessControlList actualAcl = null;
// When
try {
actualAcl = instance.parse(aclStr);
}
catch (BuildStartException buildStartException) {
actualThrowException = true;
}
// Then
then(actualThrowException).isEqualTo(expectedThrowException);
then(actualAcl).isEqualTo(expectedAcl);
}
示例2: shouldParseFiltersFromString
import jetbrains.buildServer.dotNet.buildRunner.agent.TextParser; //导入方法依赖的package包/类
@Test(dataProvider = "parseFiltersFromStringCases")
public void shouldParseFiltersFromString(@NotNull final String text, @NotNull final List<ProcessFilter> expectedFilters, boolean expectedExceptionThrown)
{
// Given
final TextParser<List<ProcessFilter>> instance = createInstance();
// When
List<ProcessFilter> actualFilters = null;
boolean actualExceptionThrown = false;
try {
actualFilters = instance.parse(text);
}
catch (BuildException ex) {
actualExceptionThrown = true;
}
// Then
if(!expectedExceptionThrown) {
//noinspection ConstantConditions,ConstantConditions
then(actualFilters).containsExactlyElementsOf(expectedFilters);
}
then(actualExceptionThrown).isEqualTo(expectedExceptionThrown);
}
示例3: shouldParseThresholdsFromString
import jetbrains.buildServer.dotNet.buildRunner.agent.TextParser; //导入方法依赖的package包/类
@Test(dataProvider = "parseThresholdsFromStringCases")
public void shouldParseThresholdsFromString(@NotNull final String text, @NotNull final Metrics expectedMetrics, boolean expectedExceptionThrown)
{
// Given
final TextParser<Metrics> instance = createInstance();
// When
Metrics actualMetrics = null;
boolean actualExceptionThrown = false;
try {
actualMetrics = instance.parse(text);
}
catch (BuildException ex) {
actualExceptionThrown = true;
}
// Then
if(!expectedExceptionThrown) {
//noinspection ConstantConditions,ConstantConditions
then(actualMetrics.getMetrics()).containsExactlyElementsOf(expectedMetrics.getMetrics());
}
then(actualExceptionThrown).isEqualTo(expectedExceptionThrown);
}
示例4: shouldParseDotTraceReportFromXml
import jetbrains.buildServer.dotNet.buildRunner.agent.TextParser; //导入方法依赖的package包/类
@Test(dataProvider = "parseDotTraceReportFromXmlCases")
public void shouldParseDotTraceReportFromXml(@NotNull final String text, @NotNull final Metrics expectedMetrics)
{
final TextParser<Metrics> instance = createInstance();
// When
final Metrics actualMetrics = instance.parse(text);
// Then
then(actualMetrics).isEqualTo(expectedMetrics);
}
示例5: shouldParseDotMemoryUnitOutputFromXml
import jetbrains.buildServer.dotNet.buildRunner.agent.TextParser; //导入方法依赖的package包/类
@Test(dataProvider = "parseDotMemoryUnitOutputFromXmlCases")
public void shouldParseDotMemoryUnitOutputFromXml(@NotNull final String text, @NotNull final DotMemoryUnitOutput expectedOutput)
{
final TextParser<DotMemoryUnitOutput> instance = createInstance();
// When
final DotMemoryUnitOutput actualOutput = instance.parse(text);
// Then
then(actualOutput).isEqualTo(expectedOutput);
}