Author: brett
Date: Wed Feb 1 15:44:06 2012
New Revision: 1239178
URL: http://svn.apache.org/viewvc?rev=1239178&view=rev
Log:
[NPANDAY-452] update tests to ensure Silverlight files are in the right
location in the ZIP
Modified:
incubator/npanday/npanday-its/trunk/src/test/java/npanday/its/AbstractNPandayIntegrationTestCase.java
incubator/npanday/npanday-its/trunk/src/test/java/npanday/its/NPANDAY_452_SilverlightAppTest.java
incubator/npanday/npanday-its/trunk/src/test/resources/NPANDAY_452_SilverlightAppTest/SilverlightApplication1.Web/pom.xml
Modified:
incubator/npanday/npanday-its/trunk/src/test/java/npanday/its/AbstractNPandayIntegrationTestCase.java
URL:
http://svn.apache.org/viewvc/incubator/npanday/npanday-its/trunk/src/test/java/npanday/its/AbstractNPandayIntegrationTestCase.java?rev=1239178&r1=1239177&r2=1239178&view=diff
==============================================================================
---
incubator/npanday/npanday-its/trunk/src/test/java/npanday/its/AbstractNPandayIntegrationTestCase.java
(original)
+++
incubator/npanday/npanday-its/trunk/src/test/java/npanday/its/AbstractNPandayIntegrationTestCase.java
Wed Feb 1 15:44:06 2012
@@ -239,6 +239,16 @@ public abstract class AbstractNPandayInt
}
}
+ protected static String translateMsDeployPath( String basedir, String path
)
+ {
+ String p = new File( new File( basedir, "target/packages" ), path
).getAbsolutePath();
+ p = p.replace( '\\', '/' );
+ p = "Content/C_C" + p.substring( 2 ); // transform C:
+ // Note: above is an assumption for where you can run these tests -
not sure how other drive letters transformed
+ // by Web Deploy
+ return p;
+ }
+
protected void runTest()
throws Throwable
{
Modified:
incubator/npanday/npanday-its/trunk/src/test/java/npanday/its/NPANDAY_452_SilverlightAppTest.java
URL:
http://svn.apache.org/viewvc/incubator/npanday/npanday-its/trunk/src/test/java/npanday/its/NPANDAY_452_SilverlightAppTest.java?rev=1239178&r1=1239177&r2=1239178&view=diff
==============================================================================
---
incubator/npanday/npanday-its/trunk/src/test/java/npanday/its/NPANDAY_452_SilverlightAppTest.java
(original)
+++
incubator/npanday/npanday-its/trunk/src/test/java/npanday/its/NPANDAY_452_SilverlightAppTest.java
Wed Feb 1 15:44:06 2012
@@ -21,6 +21,10 @@ package npanday.its;
import org.apache.maven.it.Verifier;
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+
public class NPANDAY_452_SilverlightAppTest
extends AbstractNPandayIntegrationTestCase
{
@@ -50,6 +54,20 @@ public class NPANDAY_452_SilverlightAppT
verifier.assertFilePresent(
"SilverlightApplication1.Web/ClientBin/SilverlightApplication1.xap" );
verifier.assertFilePresent(
"SilverlightApplication1.Web/ClientBin/SilverlightApplication2.xap" );
+ // make sure the XAP files also get copied by aspnet plugin
+ File zipFile = new File( verifier.getArtifactPath(
context.getGroupId(), "SilverlightApplication1.Web",
+ "1.0-SNAPSHOT",
"msdeploy.zip" ) );
+ List<String> entries = new ArrayList<String>();
+ entries.add( translateMsDeployPath( verifier.getBasedir(),
"SilverlightApplication1.Web/ClientBin/SilverlightApplication1.xap" ) );
+ entries.add( translateMsDeployPath( verifier.getBasedir(),
"SilverlightApplication1.Web/ClientBin/SilverlightApplication2.xap" ) );
+ assertZipEntries( zipFile, entries );
+
+ // make sure no bin entries as well
+ entries = new ArrayList<String>();
+ entries.add( translateMsDeployPath( verifier.getBasedir(),
"SilverlightApplication1.Web/bin/SilverlightApplication1.xap" ) );
+ entries.add( translateMsDeployPath( verifier.getBasedir(),
"SilverlightApplication1.Web/bin/SilverlightApplication2.xap" ) );
+ assertNoZipEntries( zipFile, entries );
+
verifier.verifyErrorFreeLog();
verifier.resetStreams();
}
Modified:
incubator/npanday/npanday-its/trunk/src/test/resources/NPANDAY_452_SilverlightAppTest/SilverlightApplication1.Web/pom.xml
URL:
http://svn.apache.org/viewvc/incubator/npanday/npanday-its/trunk/src/test/resources/NPANDAY_452_SilverlightAppTest/SilverlightApplication1.Web/pom.xml?rev=1239178&r1=1239177&r2=1239178&view=diff
==============================================================================
---
incubator/npanday/npanday-its/trunk/src/test/resources/NPANDAY_452_SilverlightAppTest/SilverlightApplication1.Web/pom.xml
(original)
+++
incubator/npanday/npanday-its/trunk/src/test/resources/NPANDAY_452_SilverlightAppTest/SilverlightApplication1.Web/pom.xml
Wed Feb 1 15:44:06 2012
@@ -52,26 +52,6 @@
</execution>
</executions>
</plugin>
- <plugin>
- <artifactId>maven-dependency-plugin</artifactId>
- <executions>
- <execution>
- <id>copy-silverlight</id>
- <phase>prepare-package</phase>
- <goals>
- <goal>copy-dependencies</goal>
- </goals>
- <configuration>
- <includeTypes>silverlight-application</includeTypes>
-
<includeArtifactIds>SilverlightApplication1,SilverlightApplication2</includeArtifactIds>
- <outputDirectory>ClientBin</outputDirectory>
- <overWriteReleases>true</overWriteReleases>
- <overWriteSnapshots>true</overWriteSnapshots>
- <stripVersion>true</stripVersion>
- </configuration>
- </execution>
- </executions>
- </plugin>
</plugins>
</build>
<dependencies>