11using Autofac ;
2+ using ByteSync . Business . Actions . Shared ;
3+ using ByteSync . Business . Inventories ;
24using ByteSync . Client . IntegrationTests . TestHelpers ;
5+ using ByteSync . Common . Business . Inventories ;
36using ByteSync . Common . Business . SharedFiles ;
47using ByteSync . DependencyInjection ;
5- using ByteSync . Factories ;
68using ByteSync . Interfaces . Controls . Communications . Http ;
79using ByteSync . Interfaces . Factories ;
10+ using ByteSync . Interfaces . Repositories ;
11+ using ByteSync . Interfaces . Services . Communications ;
12+ using ByteSync . Interfaces . Services . Sessions ;
813using ByteSync . ServerCommon . Interfaces . Services . Storage ;
914using ByteSync . ServerCommon . Interfaces . Services . Storage . Factories ;
1015using ByteSync . ServerCommon . Services . Storage ;
1116using ByteSync . ServerCommon . Services . Storage . Factories ;
17+ using ByteSync . Services . Communications . Transfers ;
1218
1319namespace ByteSync . Client . IntegrationTests . Services ;
1420
@@ -37,7 +43,7 @@ public void SetUp()
3743 // Set AES key for encryption/decryption used by SlicerEncrypter
3844 using var scope = _clientScope . BeginLifetimeScope ( ) ;
3945 var cloudSessionConnectionRepository = scope . Resolve < ByteSync . Interfaces . Repositories . ICloudSessionConnectionRepository > ( ) ;
40- cloudSessionConnectionRepository . SetAesEncryptionKey ( ByteSync . Client . IntegrationTests . TestHelpers . AesGenerator . GenerateKey ( ) ) ;
46+ cloudSessionConnectionRepository . SetAesEncryptionKey ( AesGenerator . GenerateKey ( ) ) ;
4147 }
4248
4349 [ TearDown ]
@@ -56,9 +62,9 @@ public async Task Upload_Then_Download_Should_Succeed_With_Small_Chunks()
5662 var uploaderFactory = scope . Resolve < IFileUploaderFactory > ( ) ;
5763 var downloaderFactory = scope . Resolve < IFileDownloaderFactory > ( ) ;
5864 var r2Service = scope . Resolve < ICloudflareR2Service > ( ) ;
59- var sharedActionsGroupRepository = scope . Resolve < ByteSync . Interfaces . Repositories . ISharedActionsGroupRepository > ( ) ;
60- var sessionService = scope . Resolve < ByteSync . Interfaces . Services . Sessions . ISessionService > ( ) ;
61- var connectionService = scope . Resolve < ByteSync . Interfaces . Services . Communications . IConnectionService > ( ) ;
65+ var sharedActionsGroupRepository = scope . Resolve < ISharedActionsGroupRepository > ( ) ;
66+ var sessionService = scope . Resolve < ISessionService > ( ) ;
67+ var connectionService = scope . Resolve < IConnectionService > ( ) ;
6268
6369 var shared = new SharedFileDefinition
6470 {
@@ -76,40 +82,40 @@ public async Task Upload_Then_Download_Should_Succeed_With_Small_Chunks()
7682 ClientId = shared . ClientInstanceId ,
7783 Version = "itests" ,
7884 IpAddress = "127.0.0.1" ,
79- OSPlatform = ByteSync . Common . Business . Misc . OSPlatforms . Windows
85+ OSPlatform = Common . Business . Misc . OSPlatforms . Windows
8086 } ;
8187 await sessionService . SetSessionStatus ( ByteSync . Business . Sessions . SessionStatus . Preparation ) ;
8288
83- var sag = new ByteSync . Business . Actions . Shared . SharedActionsGroup
89+ var sag = new SharedActionsGroup
8490 {
8591 ActionsGroupId = Guid . NewGuid ( ) . ToString ( "N" ) ,
86- SynchronizationType = ByteSync . Common . Business . Actions . SynchronizationTypes . Full ,
87- Source = new ByteSync . Business . Actions . Shared . SharedDataPart
92+ SynchronizationType = Common . Business . Actions . SynchronizationTypes . Full ,
93+ Source = new SharedDataPart
8894 {
8995 ClientInstanceId = shared . ClientInstanceId ,
9096 RootPath = Path . GetTempPath ( ) ,
91- InventoryPartType = ByteSync . Common . Business . Inventories . FileSystemTypes . File ,
97+ InventoryPartType = FileSystemTypes . File ,
9298 Name = "itests" ,
9399 InventoryCodeAndId = "itests"
94100 } ,
95- PathIdentity = new ByteSync . Business . Inventories . PathIdentity
101+ PathIdentity = new PathIdentity
96102 {
97- FileSystemType = ByteSync . Common . Business . Inventories . FileSystemTypes . File ,
103+ FileSystemType = FileSystemTypes . File ,
98104 LinkingKeyValue = "itests"
99105 }
100106 } ;
101- sag . Targets . Add ( new ByteSync . Business . Actions . Shared . SharedDataPart
107+ sag . Targets . Add ( new SharedDataPart
102108 {
103109 ClientInstanceId = shared . ClientInstanceId ,
104110 RootPath = Path . GetTempFileName ( ) ,
105- InventoryPartType = ByteSync . Common . Business . Inventories . FileSystemTypes . File ,
111+ InventoryPartType = FileSystemTypes . File ,
106112 Name = "itests" ,
107113 InventoryCodeAndId = "itests"
108114 } ) ;
109115 shared . ActionsGroupIds = [ sag . ActionsGroupId ] ;
110116 sharedActionsGroupRepository . SetSharedActionsGroups ( [ sag ] ) ;
111117
112- var inputContent = new string ( 'x' , 1_500_000 ) ;
118+ var inputContent = new string ( 'x' , 1_000_000 ) ;
113119 var tempFile = Path . GetTempFileName ( ) ;
114120 await File . WriteAllTextAsync ( tempFile , inputContent ) ;
115121
@@ -129,7 +135,7 @@ public async Task Upload_Then_Download_Should_Succeed_With_Small_Chunks()
129135 }
130136 await downloader . PartsCoordinator . SetAllPartsKnownAsync ( partsCount ) ;
131137 await downloader . WaitForFileFullyExtracted ( ) ;
132- ( downloader as ByteSync . Services . Communications . Transfers . FileDownloader ) ? . CleanupResources ( ) ;
138+ ( downloader as FileDownloader ) ? . CleanupResources ( ) ;
133139
134140 // Cleanup uploaded objects for this test
135141 var prefix = shared . SessionId + "_" + shared . ClientInstanceId + "_" ;
0 commit comments