File tree Expand file tree Collapse file tree
main/java/in/dragonbra/javasteam/steam/handlers/steamcloud
test/java/in/dragonbra/javasteam/steam/handlers/steamcloud Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ class AppFileInfo(response: CCloud_AppFileInfo) {
1111 val rawFileSize: Int = response.rawFileSize
1212 val persistState: ECloudStoragePersistState = response.persistState
1313 val platformsToSync: Int = response.platformsToSync
14+ val hasPathPrefixIndex: Boolean = response.hasPathPrefixIndex()
1415 val pathPrefixIndex: Int = response.pathPrefixIndex
1516 val machineNameIndex: Int = response.machineNameIndex
1617}
Original file line number Diff line number Diff line change 1+ package in .dragonbra .javasteam .steam .handlers .steamcloud ;
2+
3+ import in .dragonbra .javasteam .protobufs .steamclient .SteammessagesCloudSteamclient ;
4+ import org .junit .jupiter .api .Assertions ;
5+ import org .junit .jupiter .api .Test ;
6+
7+ public class AppFileInfoTest {
8+
9+ @ Test
10+ public void hasPathPrefixIndexIsFalseWhenFieldIsMissing () {
11+ var response = SteammessagesCloudSteamclient .CCloud_AppFileInfo .newBuilder ()
12+ .setFileName ("save.dat" )
13+ .build ();
14+
15+ var info = new AppFileInfo (response );
16+
17+ Assertions .assertFalse (info .getHasPathPrefixIndex ());
18+ }
19+
20+ @ Test
21+ public void hasPathPrefixIndexIsTrueWhenIndexIsZero () {
22+ var response = SteammessagesCloudSteamclient .CCloud_AppFileInfo .newBuilder ()
23+ .setFileName ("save.dat" )
24+ .setPathPrefixIndex (0 )
25+ .build ();
26+
27+ var info = new AppFileInfo (response );
28+
29+ Assertions .assertTrue (info .getHasPathPrefixIndex ());
30+ Assertions .assertEquals (0 , info .getPathPrefixIndex ());
31+ }
32+ }
You can’t perform that action at this time.
0 commit comments