incubator-ooo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wan...@apache.org
Subject svn commit: r1401962 - in /incubator/ooo/trunk/test/testuno/source/fvt/uno/sd: bullet/CheckBuildInBullet.java file/CheckFileProperties.java
Date Thu, 25 Oct 2012 03:06:13 GMT
Author: wanglf
Date: Thu Oct 25 03:06:13 2012
New Revision: 1401962

URL: http://svn.apache.org/viewvc?rev=1401962&view=rev
Log:
reconstruct Bullet and FileProperties cases.
patch by louql, reviewed by WangLifeng

Modified:
    incubator/ooo/trunk/test/testuno/source/fvt/uno/sd/bullet/CheckBuildInBullet.java
    incubator/ooo/trunk/test/testuno/source/fvt/uno/sd/file/CheckFileProperties.java

Modified: incubator/ooo/trunk/test/testuno/source/fvt/uno/sd/bullet/CheckBuildInBullet.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/test/testuno/source/fvt/uno/sd/bullet/CheckBuildInBullet.java?rev=1401962&r1=1401961&r2=1401962&view=diff
==============================================================================
--- incubator/ooo/trunk/test/testuno/source/fvt/uno/sd/bullet/CheckBuildInBullet.java (original)
+++ incubator/ooo/trunk/test/testuno/source/fvt/uno/sd/bullet/CheckBuildInBullet.java Thu
Oct 25 03:06:13 2012
@@ -97,8 +97,6 @@ public class CheckBuildInBullet {
 	@AfterClass
 	public static void tearDownAfterClass() throws Exception {
 		app.close();
-		//remove the temp file
-		FileUtil.deleteFile(Testspace.getPath("temp"));
 	}
 
 	/**
@@ -106,7 +104,7 @@ public class CheckBuildInBullet {
 	 */
 	@Before
 	public void setUp() throws Exception {
-		m_filePath = Testspace.getPath("temp/CheckBuildInBullet.odt");
+		m_filePath = Testspace.getPath("temp/CheckBuildInBullet.odp");
 //		m_filePath = "F:/aa.odp";
 		if(FileUtil.fileExists(m_filePath))
 		{	//load
@@ -128,6 +126,7 @@ public class CheckBuildInBullet {
 	@After
 	public void tearDown() throws Exception {	
 		app.closeDocument(m_xSDComponent);		
+		FileUtil.deleteFile(Testspace.getPath("temp"));
 	}
 	private XPropertySet load() throws Exception{
 		m_xSDComponent = (XComponent) UnoRuntime.queryInterface(XComponent.class, 

Modified: incubator/ooo/trunk/test/testuno/source/fvt/uno/sd/file/CheckFileProperties.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/test/testuno/source/fvt/uno/sd/file/CheckFileProperties.java?rev=1401962&r1=1401961&r2=1401962&view=diff
==============================================================================
--- incubator/ooo/trunk/test/testuno/source/fvt/uno/sd/file/CheckFileProperties.java (original)
+++ incubator/ooo/trunk/test/testuno/source/fvt/uno/sd/file/CheckFileProperties.java Thu Oct
25 03:06:13 2012
@@ -110,6 +110,8 @@ public class CheckFileProperties {
 	@After
 	public void tearDownDocument() {
 		app.closeDocument(m_xSDComponent);
+		m_filePath = Testspace.getPath("temp/CheckFileProperties.odp");	
+		FileUtil.deleteFile(m_filePath);
 
 	}
 
@@ -124,8 +126,6 @@ public class CheckFileProperties {
 	public static void tearDownConnection() throws InterruptedException,
 			Exception {
 		app.close();
-		//remove the temp file
-		FileUtil.deleteFile(Testspace.getPath("temp"));
 	}
 
 	/*
@@ -317,7 +317,7 @@ public class CheckFileProperties {
 		app.closeDocument(m_xSDComponent);
 		m_xSDComponent = app.loadDocument(m_filePath);
 		XDocumentProperties xDocPro2 = getDocumentProperties();
-		assertEquals("Revision number should be "+ revisionNumber, revisionNumber, xDocPro2.getEditingCycles());
	
+		assertEquals("Revision number should be "+ revisionNumber+1, revisionNumber+1, xDocPro2.getEditingCycles());
	
 	}
 	
 	/*
@@ -562,7 +562,8 @@ public class CheckFileProperties {
 		}
 		
 		@Test
-		public void testCustomRemovePro() throws Exception{					
+		public void testCustomRemovePro() throws Exception{		
+			addCustomPro("testPro", "value");
 			XDocumentProperties xDocPro = getDocumentProperties();
 			XPropertyContainer proContainer = xDocPro.getUserDefinedProperties();
 			XPropertySet xProSet = (XPropertySet)UnoRuntime.queryInterface(
@@ -570,11 +571,6 @@ public class CheckFileProperties {
 			XPropertySetInfo xproSetInfo = xProSet.getPropertySetInfo();
 			Property[] pros = xproSetInfo.getProperties();
 			
-			if(pros.length == 0) //if there is no custom property, add one
-			{
-				addCustomPro("testPro", "value");
-			}
-			
 			for(int i=0; i< pros.length;i++)
 			{
 				proContainer.removeProperty(pros[i].Name);



Mime
View raw message