@@ -51,6 +51,8 @@ public void BuildApplicationWithAssetPack ([Values (true, false)] bool isRelease
51
51
// Check the final aab has the required feature files in it.
52
52
var aab = Path . Combine ( Root , appBuilder . ProjectDirectory ,
53
53
app . OutputPath , $ "{ app . PackageName } .aab") ;
54
+ var asset3File = Path . Combine ( Root , path , app . ProjectName ,
55
+ app . IntermediateOutputPath , "assetpacks" , "assetpack1" , "assets" , "asset3.txt" ) ;
54
56
using ( var zip = ZipHelper . OpenZip ( aab ) ) {
55
57
Assert . IsTrue ( zip . ContainsEntry ( "base/assets/asset1.txt" ) , "aab should contain base/assets/asset1.txt" ) ;
56
58
Assert . IsFalse ( zip . ContainsEntry ( "base/assets/asset2.txt" ) , "aab should not contain base/assets/asset2.txt" ) ;
@@ -67,14 +69,18 @@ public void BuildApplicationWithAssetPack ([Values (true, false)] bool isRelease
67
69
appBuilder . Output . AssertTargetIsSkipped ( "_CreateAssetPackManifests" ) ;
68
70
appBuilder . Output . AssertTargetIsSkipped ( "_BuildAssetPacks" ) ;
69
71
appBuilder . Output . AssertTargetIsSkipped ( "_GenerateAndroidAssetsDir" ) ;
72
+ FileAssert . Exists ( asset3File , $ "file { asset3File } should exist.") ;
70
73
asset3 . TextContent = ( ) => "Asset3 Updated" ;
71
74
asset3 . Timestamp = DateTime . UtcNow . AddSeconds ( 1 ) ;
72
75
Assert . IsTrue ( appBuilder . Build ( app , doNotCleanupOnUpdate : true , saveProject : false ) , $ "{ app . ProjectName } should succeed") ;
73
76
appBuilder . Output . AssertTargetIsNotSkipped ( "_CreateAssetPackManifests" ) ;
74
77
appBuilder . Output . AssertTargetIsNotSkipped ( "_BuildAssetPacks" ) ;
75
78
appBuilder . Output . AssertTargetIsNotSkipped ( "_GenerateAndroidAssetsDir" ) ;
79
+ FileAssert . Exists ( asset3File , $ "file { asset3File } should exist.") ;
80
+ Assert . AreEqual ( asset3 . TextContent ( ) , File . ReadAllText ( asset3File ) , $ "Contents of { asset3File } should have been updated.") ;
76
81
app . OtherBuildItems . Remove ( asset3 ) ;
77
82
Assert . IsTrue ( appBuilder . Build ( app , doNotCleanupOnUpdate : true ) , $ "{ app . ProjectName } should succeed") ;
83
+ FileAssert . DoesNotExist ( asset3File , $ "file { asset3File } should not exist.") ;
78
84
using ( var zip = ZipHelper . OpenZip ( aab ) ) {
79
85
Assert . IsTrue ( zip . ContainsEntry ( "base/assets/asset1.txt" ) , "aab should contain base/assets/asset1.txt" ) ;
80
86
Assert . IsFalse ( zip . ContainsEntry ( "base/assets/asset2.txt" ) , "aab should not contain base/assets/asset2.txt" ) ;
0 commit comments