| 
1 | 1 | /*  | 
2 |  | - * Copyright 2022 the original author or authors.  | 
 | 2 | + * Copyright 2022-2024 the original author or authors.  | 
3 | 3 |  *  | 
4 | 4 |  * Licensed under the Apache License, Version 2.0 (the "License");  | 
5 | 5 |  * you may not use this file except in compliance with the License.  | 
 | 
33 | 33 | import org.springframework.integration.file.remote.session.Session;  | 
34 | 34 | import org.springframework.integration.file.remote.session.SessionFactory;  | 
35 | 35 | import org.springframework.integration.smb.session.SmbSessionFactory;  | 
36 |  | -import org.springframework.integration.test.util.TestUtils;  | 
37 | 36 | 
 
  | 
38 | 37 | /**  | 
39 | 38 |  * Provides a connection to a Testcontainers-driven SMB Server for test cases.  | 
@@ -101,17 +100,12 @@ public static void connectToSMBServer() throws IOException {  | 
101 | 100 | 		try (Session<SmbFile> smbFileSession = smbSessionFactory.getSession()) {  | 
102 | 101 | 			smbFileSession.mkdir("smbTarget");  | 
103 | 102 | 			Charset charset = StandardCharsets.UTF_8;  | 
104 |  | -			smbFileSession.write(IOUtils.toInputStream("source1", charset),  | 
105 |  | -					TestUtils.applySystemFileSeparator("smbSource/smbSource1.txt"));  | 
106 |  | -			smbFileSession.write(IOUtils.toInputStream("source2", charset),  | 
107 |  | -					TestUtils.applySystemFileSeparator("smbSource/smbSource2.txt"));  | 
 | 103 | +			smbFileSession.write(IOUtils.toInputStream("source1", charset), "smbSource/smbSource1.txt");  | 
 | 104 | +			smbFileSession.write(IOUtils.toInputStream("source2", charset), "smbSource/smbSource2.txt");  | 
108 | 105 | 			smbFileSession.write(IOUtils.toInputStream("", charset), "SMBSOURCE1.TXT.a");  | 
109 | 106 | 			smbFileSession.write(IOUtils.toInputStream("", charset), "SMBSOURCE2.TXT.a");  | 
110 |  | - | 
111 |  | -			smbFileSession.write(IOUtils.toInputStream("subSource1", charset),  | 
112 |  | -					TestUtils.applySystemFileSeparator("smbSource/subSmbSource/subSmbSource1.txt"));  | 
113 |  | -			smbFileSession.write(IOUtils.toInputStream("subSource2", charset),  | 
114 |  | -					TestUtils.applySystemFileSeparator("smbSource/subSmbSource/subSmbSource2.txt"));  | 
 | 107 | +			smbFileSession.write(IOUtils.toInputStream("subSource1", charset), "smbSource/subSmbSource/subSmbSource1.txt");  | 
 | 108 | +			smbFileSession.write(IOUtils.toInputStream("subSource2", charset), "smbSource/subSmbSource/subSmbSource2.txt");  | 
115 | 109 | 		}  | 
116 | 110 | 	}  | 
117 | 111 | 
 
  | 
 | 
0 commit comments