• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java FileAssert类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



FileAssert类属于junitx.framework包,在下文中一共展示了FileAssert类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: testActivatePropertyFileExistsOverwriteDisabled

import junitx.framework.FileAssert; //导入依赖的package包/类
@Test
public void testActivatePropertyFileExistsOverwriteDisabled() throws IOException, URISyntaxException {
	/* Prepare data. */
	assertEquals(0, this.baseDir.list().length);
	createTempFiles(SYNC_CONFIG_FN);
	this.props.remove(InitialRegistrationImpl.PROP_SYNC_ONCE_TYPE);
	this.props.put(InitialRegistrationImpl.PROP_OVERWRITE_CONFIG_FILES, true);

	/* Invoke method. */
	this.initialRegistration.activate(this.props);

	/* Check its results. */
	FileAssert.assertEquals(getResource("data3-config.properties"), this.generatedConfigFile);
	FileAssert.assertEquals(getResource("data1-filter.xml"), this.generatedFilterFile);
	verify(this.serviceSettings, times(1)).addSyncRoot(this.baseDir, 3000l);
}
 
开发者ID:daniel-lima,项目名称:aem-vltsync,代码行数:17,代码来源:InitialRegistrationImplTest.java


示例2: testActivatePropertyFileExistsDirWithContentsOverwrite

import junitx.framework.FileAssert; //导入依赖的package包/类
@Test
public void testActivatePropertyFileExistsDirWithContentsOverwrite() throws IOException, URISyntaxException {
	/* Prepare data. */
	assertEquals(0, this.baseDir.list().length);
	createTempFiles("README.md", SYNC_CONFIG_FN);
	this.props.put(InitialRegistrationImpl.PROP_OVERWRITE_CONFIG_FILES, true);
	this.props.put(InitialRegistrationImpl.PROP_SYNC_ONCE_EXPECTED_TIME, 3001l);

	/* Invoke method. */
	this.initialRegistration.activate(this.props);

	/* Check its results. */
	FileAssert.assertEquals(getResource("data2-config.properties"), this.generatedConfigFile);
	FileAssert.assertEquals(getResource("data1-filter.xml"), this.generatedFilterFile);
	verify(this.serviceSettings, times(1)).addSyncRoot(this.baseDir, 3001l);
}
 
开发者ID:daniel-lima,项目名称:aem-vltsync,代码行数:17,代码来源:InitialRegistrationImplTest.java


示例3: assertDirectoriesEqual

import junitx.framework.FileAssert; //导入依赖的package包/类
/**
 * Primitive DB comparison method
 * We just compare file names, not the subdirecory structure also
 * (so this would fail if multiple subdirectories had the same file name)
 */
public static void assertDirectoriesEqual(File expected, File actual) {
    MutableList<File> expectedFiles = FastList.newList(FileUtils.listFiles(expected, new WildcardFileFilter("*"),
            DIR_FILE_FILTER));
    expectedFiles = expectedFiles.sortThisBy(toRelativePath(expected));
    MutableList<File> actualFiles = FastList.newList(FileUtils.listFiles(actual, new WildcardFileFilter("*"),
            DIR_FILE_FILTER));
    actualFiles = actualFiles.sortThisBy(toRelativePath(actual));

    assertEquals(
            String.format("Directories did not have same # of files:\nExpected: %1$s\nbut was: %2$s",
                    expectedFiles.makeString("\n"), actualFiles.makeString("\n")),
            expectedFiles.size(), actualFiles.size());
    for (int i = 0; i < expectedFiles.size(); i++) {
        File expectedFile = expectedFiles.get(i);
        File actualFile = actualFiles.get(i);

        String expectedFilePath = getRelativePath(expectedFile, expected);
        String actualFilePath = getRelativePath(actualFile, actual);
        System.out.println("Comparing" + expectedFilePath + " vs " + actualFilePath);

        assertEquals("File " + i + " [" + expectedFile + " vs " + actualFile
                + " does not match paths relative from their roots", expectedFilePath, actualFilePath);
        FileAssert.assertEquals("Mismatch on file " + expectedFile.getAbsolutePath(), expectedFile, actualFile);
    }
}
 
开发者ID:goldmansachs,项目名称:obevo,代码行数:31,代码来源:DirectoryAssert.java


示例4: test

import junitx.framework.FileAssert; //导入依赖的package包/类
@Test
public void test() {
    this.jdbc.execute(conn, "INSERT INTO " + schema + "." + table + " (INT1, STR1, DATE1, TIMESTAMP1) " +
            "VALUES (1, 'val1', '2017-01-01', '2016-02-02 22:22:22.2')");
    this.jdbc.execute(conn, "INSERT INTO " + schema + "." + table + " (INT1, STR1, DATE1, TIMESTAMP1) " +
            "VALUES (2, null, '2017-02-02', null)");
    this.jdbc.execute(conn, "INSERT INTO " + schema + "." + table + " (INT1, STR1, DATE1, TIMESTAMP1) " +
            "VALUES (null, 'val\\3', null, '2016-03-03 22:22:22.2')");

    AquaRevengArgs args = new AquaRevengArgs();
    args.setDbTypeStr("H2");
    args.setJdbcUrl(url);
    args.setDriverClass(org.h2.Driver.class.getName());
    args.setDbSchema(schema);
    args.setTables(new String[] {table});
    args.setUsername("sa");
    args.setPassword("");
    File outputPath = new File("./target/csvoutput");
    args.setOutputPath(outputPath);
    CsvStaticDataWriter.start(args, new File("./target/csvoutputwork"));

    FileAssert.assertEquals(new File("./src/test/resources/CsvStaticDataWriter/TABLE1.expected.csv"), new File(outputPath, "staticdata/TABLE1.csv"));
}
 
开发者ID:goldmansachs,项目名称:obevo,代码行数:24,代码来源:CsvStaticDataWriterTest.java


示例5: testBsonFile

import junitx.framework.FileAssert; //导入依赖的package包/类
private void testBsonFile (String fileName, boolean useDouble) throws IOException
{
	// data1.bson has 0 in Document / Array length
	File file = new File (fileName.replace ('/', File.separatorChar));

	File testFile = testFolder.newFile ();
	BsonParser p = new BsonParser (new FileInputStream (file));
	BsonGenerator g = new BsonGenerator (new FileOutputStream (testFile));
	g.setUseDouble (useDouble);
	Utils.convert (p, g);
	p.close ();
	g.close ();
	BsonFixLength.fix (testFile);

	FileAssert.assertBinaryEquals (file, testFile);
}
 
开发者ID:coconut2015,项目名称:cookjson,代码行数:17,代码来源:BsonGeneratorTest.java


示例6: testJsonBinary

import junitx.framework.FileAssert; //导入依赖的package包/类
@Test
public void testJsonBinary () throws IOException
{
	File bsonFile = testFolder.newFile ();
	BsonGenerator g = new BsonGenerator (new FileOutputStream (bsonFile));
	g.writeStartArray ();
	g.write (new byte[] { (byte) 0xde, (byte) 0xad, (byte) 0xbe, (byte) 0xef });
	g.writeEnd ();
	g.close ();

	// read into a structure which contains CookJsonBinary
	BsonParser p = new BsonParser (new FileInputStream (bsonFile));
	p.setRootAsArray (true);
	p.next ();
	JsonValue value = p.getValue ();
	p.close ();

	// now write to another BSON file;
	File bsonFile2 = testFolder.newFile ();
	BsonGenerator g2 = new BsonGenerator (new FileOutputStream (bsonFile2));
	g2.write (value);
	g2.close ();

	// now verify that our original data written was correct.
	FileAssert.assertBinaryEquals (bsonFile, bsonFile2);
}
 
开发者ID:coconut2015,项目名称:cookjson,代码行数:27,代码来源:BsonGeneratorTest.java


示例7: testBigInteger

import junitx.framework.FileAssert; //导入依赖的package包/类
@Test
public void testBigInteger () throws IOException
{
	File bsonFile = testFolder.newFile ();
	BsonGenerator g = new BsonGenerator (new FileOutputStream (bsonFile));
	g.writeStartArray ();
	g.write (new BigInteger ("123456789012345678901234567890"));
	g.writeEnd ();
	g.close ();

	// now write to another BSON file;
	File bsonFile2 = testFolder.newFile ();
	BsonGenerator g2 = new BsonGenerator (new FileOutputStream (bsonFile2));
	g2.writeStartArray ();
	g2.write (new CookJsonBigDecimal (new BigDecimal ("123456789012345678901234567890")) );
	g2.writeEnd ();
	g2.close ();

	// now verify that our original data written was correct.
	FileAssert.assertBinaryEquals (bsonFile, bsonFile2);
}
 
开发者ID:coconut2015,项目名称:cookjson,代码行数:22,代码来源:BsonGeneratorTest.java


示例8: testJson

import junitx.framework.FileAssert; //导入依赖的package包/类
@Test
public void testJson () throws IOException
{
	File file1 = new File ("../tests/data/binary.bson".replace ('/', File.separatorChar));
	File file2 = new File ("../tests/data/binary.json".replace ('/', File.separatorChar));

	CookJsonProvider provider = new CookJsonProvider ();
	HashMap<String, Object> bsonConfig = new HashMap<String, Object> ();
	bsonConfig.put (CookJsonProvider.FORMAT, CookJsonProvider.FORMAT_BSON);
	bsonConfig.put (CookJsonProvider.ROOT_AS_ARRAY, Boolean.TRUE);

	HashMap<String, Object> jsonConfig = new HashMap<String, Object> ();

	File jsonFile = testFolder.newFile ();
	JsonParser p = provider.createParserFactory (bsonConfig).createParser (new FileInputStream (file1));
	JsonGenerator g = provider.createGeneratorFactory (jsonConfig).createGenerator (new FileOutputStream (jsonFile));
	Utils.convert (p, g);
	p.close ();
	g.close ();

	FileAssert.assertBinaryEquals (file2, jsonFile);
}
 
开发者ID:coconut2015,项目名称:cookjson,代码行数:23,代码来源:BinaryTest.java


示例9: testJsonHex

import junitx.framework.FileAssert; //导入依赖的package包/类
@Test
public void testJsonHex () throws IOException
{
	File file1 = new File ("../tests/data/binary.bson".replace ('/', File.separatorChar));
	File file2 = new File ("../tests/data/binary2.json".replace ('/', File.separatorChar));

	CookJsonProvider provider = new CookJsonProvider ();
	HashMap<String, Object> bsonConfig = new HashMap<String, Object> ();
	bsonConfig.put (CookJsonProvider.FORMAT, CookJsonProvider.FORMAT_BSON);
	bsonConfig.put (CookJsonProvider.ROOT_AS_ARRAY, Boolean.TRUE);

	HashMap<String, Object> jsonConfig = new HashMap<String, Object> ();
	jsonConfig.put (CookJsonProvider.BINARY_FORMAT, CookJsonProvider.BINARY_FORMAT_HEX);

	File jsonFile = testFolder.newFile ();
	JsonParser p = provider.createParserFactory (bsonConfig).createParser (new FileInputStream (file1));
	JsonGenerator g = provider.createGeneratorFactory (jsonConfig).createGenerator (new FileOutputStream (jsonFile));
	Utils.convert (p, g);
	p.close ();
	g.close ();

	FileAssert.assertBinaryEquals (file2, jsonFile);
}
 
开发者ID:coconut2015,项目名称:cookjson,代码行数:24,代码来源:BinaryTest.java


示例10: testBson

import junitx.framework.FileAssert; //导入依赖的package包/类
@Test
public void testBson () throws IOException
{
	File file1 = new File ("../tests/data/binary.bson".replace ('/', File.separatorChar));

	CookJsonProvider provider = new CookJsonProvider ();
	HashMap<String, Object> bsonConfig = new HashMap<String, Object> ();
	bsonConfig.put (CookJsonProvider.FORMAT, CookJsonProvider.FORMAT_BSON);
	bsonConfig.put (CookJsonProvider.ROOT_AS_ARRAY, Boolean.TRUE);

	// first convert from Json to Bson using stream API
	File bsonFile = testFolder.newFile ();
	JsonParser p = provider.createParserFactory (bsonConfig).createParser (new FileInputStream (file1));
	JsonGenerator g = provider.createGeneratorFactory (bsonConfig).createGenerator (new FileOutputStream (bsonFile));
	Utils.convert (p, g);
	p.close ();
	g.close ();

	BsonFixLength.fix (bsonFile);
	FileAssert.assertBinaryEquals (file1, bsonFile);
}
 
开发者ID:coconut2015,项目名称:cookjson,代码行数:22,代码来源:BinaryTest.java


示例11: testJsonValueJson

import junitx.framework.FileAssert; //导入依赖的package包/类
@Test
public void testJsonValueJson () throws IOException
{
	File file1 = new File ("../tests/data/binary.bson".replace ('/', File.separatorChar));
	File file2 = new File ("../tests/data/binary.json".replace ('/', File.separatorChar));

	CookJsonProvider provider = new CookJsonProvider ();
	HashMap<String, Object> bsonConfig = new HashMap<String, Object> ();
	bsonConfig.put (CookJsonProvider.FORMAT, CookJsonProvider.FORMAT_BSON);
	bsonConfig.put (CookJsonProvider.ROOT_AS_ARRAY, Boolean.TRUE);

	HashMap<String, Object> jsonConfig = new HashMap<String, Object> ();

	File jsonFile = testFolder.newFile ();
	CookJsonParser p = (CookJsonParser) provider.createParserFactory (bsonConfig).createParser (new FileInputStream (file1));
	p.next ();
	JsonValue value = p.getValue ();
	JsonGenerator g = provider.createGeneratorFactory (jsonConfig).createGenerator (new FileOutputStream (jsonFile));
	g.write (value);
	p.close ();
	g.close ();

	FileAssert.assertBinaryEquals (file2, jsonFile);
}
 
开发者ID:coconut2015,项目名称:cookjson,代码行数:25,代码来源:BinaryTest.java


示例12: testJsonValueJsonHex

import junitx.framework.FileAssert; //导入依赖的package包/类
@Test
public void testJsonValueJsonHex () throws IOException
{
	File file1 = new File ("../tests/data/binary.bson".replace ('/', File.separatorChar));
	File file2 = new File ("../tests/data/binary2.json".replace ('/', File.separatorChar));

	CookJsonProvider provider = new CookJsonProvider ();
	HashMap<String, Object> bsonConfig = new HashMap<String, Object> ();
	bsonConfig.put (CookJsonProvider.FORMAT, CookJsonProvider.FORMAT_BSON);
	bsonConfig.put (CookJsonProvider.ROOT_AS_ARRAY, Boolean.TRUE);

	HashMap<String, Object> jsonConfig = new HashMap<String, Object> ();
	jsonConfig.put (CookJsonProvider.BINARY_FORMAT, CookJsonProvider.BINARY_FORMAT_HEX);

	File jsonFile = testFolder.newFile ();
	CookJsonParser p = (CookJsonParser) provider.createParserFactory (bsonConfig).createParser (new FileInputStream (file1));
	p.next ();
	JsonValue value = p.getValue ();
	JsonGenerator g = provider.createGeneratorFactory (jsonConfig).createGenerator (new FileOutputStream (jsonFile));
	g.write (value);
	p.close ();
	g.close ();

	FileAssert.assertBinaryEquals (file2, jsonFile);
}
 
开发者ID:coconut2015,项目名称:cookjson,代码行数:26,代码来源:BinaryTest.java


示例13: testRootAsArray

import junitx.framework.FileAssert; //导入依赖的package包/类
@Test
public void testRootAsArray () throws Exception
{
	// test Bson input with rootAsArray option

	File srcFile;
	File dstFile;
	File dstFile2;

	srcFile = new File ("../tests/data/data1.bson".replace ('/', File.separatorChar));
	dstFile = testFolder.newFile ("testroot_1.json");
	ConvertJson.main (new String[]{ "-f", srcFile.getPath (), "-t", dstFile.getPath (), "-a" });

	srcFile = new File ("../tests/data/data3.json".replace ('/', File.separatorChar));
	dstFile2 = testFolder.newFile ("testroot_2.json");
	ConvertJson.main (new String[]{ "-f", srcFile.getPath (), "-t", dstFile2.getPath () });
	FileAssert.assertBinaryEquals (dstFile, dstFile2);
}
 
开发者ID:coconut2015,项目名称:cookjson,代码行数:19,代码来源:ConvertJsonTest.java


示例14: testHexadecimal

import junitx.framework.FileAssert; //导入依赖的package包/类
@Test
public void testHexadecimal () throws Exception
{
	// test Bson input with rootAsArray option

	File srcFile;
	File expectFile;
	File dstFile;

	srcFile = new File ("../tests/data/binary.bson".replace ('/', File.separatorChar));
	dstFile = testFolder.newFile ("testbinary.json");
	ConvertJson.main (new String[]{ "-f", srcFile.getPath (), "-t", dstFile.getPath (), "-a", "-x" });

	expectFile = new File ("../tests/data/binary2.json".replace ('/', File.separatorChar));
	FileAssert.assertBinaryEquals (expectFile, dstFile);
}
 
开发者ID:coconut2015,项目名称:cookjson,代码行数:17,代码来源:ConvertJsonTest.java


示例15: testAccessToSoundFile

import junitx.framework.FileAssert; //导入依赖的package包/类
@Test
public void testAccessToSoundFile() throws IOException {
    //logger.info("working directory: {}", System.getProperty("user.dir") );
    URL url = this
            .getClass()
            .getResource(
                    "/sound_files/hello_world/b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9_processed.wav");
    File expectedHelloWorldWaveFile = new File(url.getFile());
    
    //String usedUrl = "http://localhost:" + port + "/api/generateSpeak?words={words}";
    String usedUrl = eac.getInsideRootUrl() + "/api/generateSpeak?words={words}";
    assertEquals("http://localhost:8085/api/generateSpeak?words={words}", usedUrl);
    
    Map<String, String> helloWorldQueryParameters = ImmutableMap.<String, String>builder().put("words","hello world").build();
    ResponseEntity<String> urlResponse = restTemplate.getForEntity(usedUrl, String.class, helloWorldQueryParameters);
    
    String actualHelloWorldWaveFileUrlString = urlResponse.getBody();
    assertEquals("http://localhost:8085/ext-url-resources/b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9_processed.wav", actualHelloWorldWaveFileUrlString);
    
    URL actualHelloWorldWaveFileUrl = new URL(actualHelloWorldWaveFileUrlString);
    
    File actualHelloWorldWaveFile = tempDirectory.newFile("actualHelloWorldWaveFile.wav");
    FileUtils.copyURLToFile(actualHelloWorldWaveFileUrl, actualHelloWorldWaveFile);
    
    FileAssert.assertBinaryEquals(expectedHelloWorldWaveFile, actualHelloWorldWaveFile);
}
 
开发者ID:Abdull,项目名称:sipgate-io-spring-boot,代码行数:27,代码来源:SipgateIoIntegrationTests.java


示例16: testReadEqualsWrite

import junitx.framework.FileAssert; //导入依赖的package包/类
@Test
public void testReadEqualsWrite()
		throws IOException {
	manager.readFile(exampleConf, new ErrorContainer());
	InputStream stream = new ByteArrayInputStream(manager.getRawString().getBytes(
			HacklaceConfigManager.HACKLACE_CHARSET));
	binExporter.write(stream, output);
	if (output.length() < 256) {
		// pad with zeros
		long toWrite = 256 - output.length();
		FileOutputStream fos = new FileOutputStream(output, true);
		while (toWrite-- > 0) fos.write(0);
		fos.close();
	}
	FileAssert.assertBinaryEquals(exampleFlash, output);
}
 
开发者ID:Twissi,项目名称:Animator,代码行数:17,代码来源:BinExporterTest.java


示例17: testVeraChecksOnProject

import junitx.framework.FileAssert; //导入依赖的package包/类
@Test
public void testVeraChecksOnProject() throws Exception
{
    final File testDir = new File( getClass().getResource( "/compute-pi-vera-test/compute-pi" ).getPath() );
    final Verifier verifier = new Verifier( testDir.getAbsolutePath() );
    
    addPropertiesToVerifier( verifier );
    verifier.getSystemProperties().setProperty( MSBuildMojoITHelper.MSBUILD_PLUGIN_TOOLS_ENABLE, "true" );
    verifier.setMavenDebug( true );
    
    verifier.executeGoal( GROUPID + ":" + ARTIFACTID + ":" + VeraMojo.MOJO_NAME );
    verifier.verifyErrorFreeLog();
    
    FileAssert.assertEquals( 
            new File( testDir, "expected/vera-report-compute-pi-Win32-Debug.xml" ), 
            new File( testDir, "checkstyle-reports/vera-report-compute-pi-Win32-Debug.xml" ) );

    FileAssert.assertEquals( 
            new File( testDir, "expected/vera-report-compute-pi-Win32-Release.xml" ), 
            new File( testDir, "checkstyle-reports/vera-report-compute-pi-Win32-Release.xml" ) );
}
 
开发者ID:andi12,项目名称:msbuild-maven-plugin,代码行数:22,代码来源:MavenITVeraTest.java


示例18: solutionCheck

import junitx.framework.FileAssert; //导入依赖的package包/类
@Test
public void solutionCheck() throws Exception
{
    File testDir = ResourceExtractor.simpleExtractResources( getClass(),
            "/hello-world-cppcheck-test" );

    Verifier verifier = new Verifier( testDir.getAbsolutePath() );
    addPropertiesToVerifier( verifier );
    verifier.getSystemProperties().setProperty( MSBuildMojoITHelper.MSBUILD_PLUGIN_TOOLS_ENABLE, "true" );
    
    verifier.executeGoal( GROUPID + ":" + ARTIFACTID + ":" + CppCheckMojo.MOJO_NAME );
    verifier.verifyErrorFreeLog();
    
    FileAssert.assertEquals( 
            new File( testDir, "expected\\cppcheck-report-hello-world-Win32-Debug.xml" ), 
            new File( testDir, "hello-world\\cppcheck-reports\\cppcheck-report-hello-world-Win32-Debug.xml" ) );

    FileAssert.assertEquals( 
            new File( testDir, "expected\\cppcheck-report-hello-world-Win32-Release.xml" ), 
            new File( testDir, "hello-world\\cppcheck-reports\\cppcheck-report-hello-world-Win32-Release.xml" ) );
}
 
开发者ID:andi12,项目名称:msbuild-maven-plugin,代码行数:22,代码来源:MavenITHelloWorldCppCheckTest.java


示例19: projectCheck

import junitx.framework.FileAssert; //导入依赖的package包/类
@Test
public void projectCheck() throws Exception
{
    File testDir = ResourceExtractor.simpleExtractResources( getClass(),
            "/hello-world-cppcheck-test/hello-world" );

    Verifier verifier = new Verifier( testDir.getAbsolutePath() );
    addPropertiesToVerifier( verifier );
    verifier.getSystemProperties().setProperty( MSBuildMojoITHelper.MSBUILD_PLUGIN_TOOLS_ENABLE, "true" );
    
    verifier.executeGoal( GROUPID + ":" + ARTIFACTID + ":" + CppCheckMojo.MOJO_NAME );
    verifier.verifyErrorFreeLog();
    
    FileAssert.assertEquals( 
            new File( testDir, "expected\\cppcheck-report-hello-world-Win32-Debug.xml" ), 
            new File( testDir, "cppcheck-reports\\cppcheck-report-hello-world-Win32-Debug.xml" ) );

    FileAssert.assertEquals( 
            new File( testDir, "expected\\cppcheck-report-hello-world-Win32-Release.xml" ), 
            new File( testDir, "cppcheck-reports\\cppcheck-report-hello-world-Win32-Release.xml" ) );
}
 
开发者ID:andi12,项目名称:msbuild-maven-plugin,代码行数:22,代码来源:MavenITHelloWorldCppCheckTest.java


示例20: simpleConfig

import junitx.framework.FileAssert; //导入依赖的package包/类
/**
 * Test simple configuration with no CppCheck or CxxTest
 * @throws Exception if there is a problem setting up and running Maven
 */
@Test
public void simpleConfig() throws Exception
{
    File testDir = ResourceExtractor.simpleExtractResources( getClass(),
            "/sonar-config-test" );

    Verifier verifier = new Verifier( testDir.getAbsolutePath() );
    addPropertiesToVerifier( verifier );
    
    verifier.executeGoal( SONAR_GOAL );
    verifier.verifyErrorFreeLog();

    FileAssert.assertEquals( 
            new File( testDir, "expected\\sonar-simple-Win32-Debug.properties" ), 
            new File( testDir, "target\\sonar-configuration-Win32-Debug.properties" ) );
    FileAssert.assertEquals( 
            new File( testDir, "expected\\sonar-simple-Win32-Release.properties" ), 
            new File( testDir, "target\\sonar-configuration-Win32-Release.properties" ) );
}
 
开发者ID:andi12,项目名称:msbuild-maven-plugin,代码行数:24,代码来源:MavenITSonarConfigurationTest.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java IDefaultProvider类代码示例发布时间:2022-05-22
下一篇:
Java ResilientPropagation类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap