当前位置: 首页>>代码示例>>Java>>正文


Java TextParser类代码示例

本文整理汇总了Java中jetbrains.buildServer.dotNet.buildRunner.agent.TextParser的典型用法代码示例。如果您正苦于以下问题:Java TextParser类的具体用法?Java TextParser怎么用?Java TextParser使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


TextParser类属于jetbrains.buildServer.dotNet.buildRunner.agent包,在下文中一共展示了TextParser类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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);
}
 
开发者ID:JetBrains,项目名称:teamcity-runas-plugin,代码行数:23,代码来源:FileAccessParserTest.java

示例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);
}
 
开发者ID:JetBrains,项目名称:teamcity-dottrace,代码行数:26,代码来源:ProcessFilterParserTest.java

示例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);
}
 
开发者ID:JetBrains,项目名称:teamcity-dottrace,代码行数:26,代码来源:MetricsParserTest.java

示例4: AccessControlListProviderImpl

import jetbrains.buildServer.dotNet.buildRunner.agent.TextParser; //导入依赖的package包/类
public AccessControlListProviderImpl(
  @NotNull final PathsService pathsService,
  @NotNull final TextParser<AccessControlList> fileAccessParser,
  @NotNull final AgentParametersService agentParametersService,
  @NotNull final ProfileParametersService profileParametersService) {
  myPathsService = pathsService;
  myFileAccessParser = fileAccessParser;
  myAgentParametersService = agentParametersService;
  myProfileParametersService = profileParametersService;
}
 
开发者ID:JetBrains,项目名称:teamcity-runas-plugin,代码行数:11,代码来源:AccessControlListProviderImpl.java

示例5: setUp

import jetbrains.buildServer.dotNet.buildRunner.agent.TextParser; //导入依赖的package包/类
@BeforeMethod
public void setUp()
{
  myCtx = new Mockery();
  myPathsService = myCtx.mock(PathsService.class);
  //noinspection unchecked
  myFileAccessParser = (TextParser<AccessControlList>)myCtx.mock(TextParser.class);
  myAgentParametersService = myCtx.mock(AgentParametersService.class);
  myProfileParametersService = myCtx.mock(ProfileParametersService.class);
}
 
开发者ID:JetBrains,项目名称:teamcity-runas-plugin,代码行数:11,代码来源:AccessControlListProviderTest.java

示例6: 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);
}
 
开发者ID:JetBrains,项目名称:teamcity-dottrace,代码行数:12,代码来源:ReportParserTest.java

示例7: 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);
}
 
开发者ID:JetBrains,项目名称:teamcity-dotmemory,代码行数:12,代码来源:DotMemoryUnitOutputParserTest.java

示例8: createInstance

import jetbrains.buildServer.dotNet.buildRunner.agent.TextParser; //导入依赖的package包/类
@NotNull
private TextParser<AccessControlList> createInstance()
{
  return new FileAccessParser();
}
 
开发者ID:JetBrains,项目名称:teamcity-runas-plugin,代码行数:6,代码来源:FileAccessParserTest.java

示例9: createInstance

import jetbrains.buildServer.dotNet.buildRunner.agent.TextParser; //导入依赖的package包/类
@NotNull
private TextParser<List<ProcessFilter>> createInstance()
{
  return new ProcessFilterParser();
}
 
开发者ID:JetBrains,项目名称:teamcity-dottrace,代码行数:6,代码来源:ProcessFilterParserTest.java

示例10: createInstance

import jetbrains.buildServer.dotNet.buildRunner.agent.TextParser; //导入依赖的package包/类
@NotNull
private TextParser<Metrics> createInstance()
{
  return new ReportParser(new XmlDocumentManagerImpl());
}
 
开发者ID:JetBrains,项目名称:teamcity-dottrace,代码行数:6,代码来源:ReportParserTest.java

示例11: createInstance

import jetbrains.buildServer.dotNet.buildRunner.agent.TextParser; //导入依赖的package包/类
@NotNull
private TextParser<Metrics> createInstance()
{
  return new ThresholdsParser();
}
 
开发者ID:JetBrains,项目名称:teamcity-dottrace,代码行数:6,代码来源:MetricsParserTest.java

示例12: createInstance

import jetbrains.buildServer.dotNet.buildRunner.agent.TextParser; //导入依赖的package包/类
@NotNull
private TextParser<DotMemoryUnitOutput> createInstance()
{
  return new DotMemoryUnitOutputParser(new XmlDocumentManagerImpl());
}
 
开发者ID:JetBrains,项目名称:teamcity-dotmemory,代码行数:6,代码来源:DotMemoryUnitOutputParserTest.java


注:本文中的jetbrains.buildServer.dotNet.buildRunner.agent.TextParser类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。