Skip to content

Commit 242e441

Browse files
Removed unused files
1 parent d7b3c8e commit 242e441

7 files changed

Lines changed: 4075 additions & 4203 deletions

File tree

.idea/.gitignore

Lines changed: 0 additions & 3 deletions
This file was deleted.

.idea/compiler.xml

Lines changed: 0 additions & 14 deletions
This file was deleted.

.idea/encodings.xml

Lines changed: 0 additions & 9 deletions
This file was deleted.

sdm/src/main/java/com/sap/cds/sdm/service/SDMServiceImpl.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,6 @@ public String getObject(String objectId, SDMCredentials sdmCredentials, Boolean
281281
public void readDocument(
282282
String objectId, SDMCredentials sdmCredentials, AttachmentReadEventContext context) {
283283
String repositoryId = SDMConstants.REPOSITORY_ID;
284-
// String subdomain = TokenHandler.getSubdomainFromToken(jwtToken);
285284
String grantType = context.getUserInfo().isSystemUser() ? TECHNICAL_USER_FLOW : NAMED_USER_FLOW;
286285
logger.info("This is a :" + grantType + " flow");
287286
var httpClient = TokenHandler.getHttpClient(binding, connectionPool, null, grantType);
Lines changed: 45 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,45 @@
1-
// package integration.com.sap.cds.sdm;
2-
//
3-
// import static org.junit.jupiter.api.Assertions.fail;
4-
//
5-
// import java.io.*;
6-
// import java.util.ArrayList;
7-
// import java.util.List;
8-
// import java.util.Random;
9-
//
10-
// public class IntegrationTestUtils {
11-
//
12-
// public String getDropDownValue() {
13-
// ClassLoader classLoader = getClass().getClassLoader();
14-
// File csvFile = new File(classLoader.getResource("WDIRSCodeList.csv").getFile());
15-
//
16-
// List<String> codes = new ArrayList<>();
17-
//
18-
// try (BufferedReader br = new BufferedReader(new FileReader(csvFile))) {
19-
// String line;
20-
// boolean firstLine = true;
21-
// while ((line = br.readLine()) != null) {
22-
// if (firstLine) {
23-
// firstLine = false; // Skip header
24-
// continue;
25-
// }
26-
// String[] parts = line.split(";");
27-
// if (parts.length >= 1 && !parts[0].trim().isEmpty()) {
28-
// codes.add(parts[0].trim()); // Add the code (A, B, C) to list
29-
// }
30-
// }
31-
// } catch (FileNotFoundException e) {
32-
// throw new RuntimeException(e);
33-
// } catch (IOException e) {
34-
// throw new RuntimeException(e);
35-
// }
36-
//
37-
// if (codes.isEmpty()) {
38-
// fail("No valid dropdown code found in WDIRSCodeList.csv");
39-
// }
40-
//
41-
// // Return a random value from the list
42-
// Random random = new Random();
43-
// return codes.get(random.nextInt(codes.size()));
44-
// }
45-
// }
1+
package integration.com.sap.cds.sdm;
2+
3+
import static org.junit.jupiter.api.Assertions.fail;
4+
5+
import java.io.*;
6+
import java.util.ArrayList;
7+
import java.util.List;
8+
import java.util.Random;
9+
10+
public class IntegrationTestUtils {
11+
12+
public String getDropDownValue() {
13+
ClassLoader classLoader = getClass().getClassLoader();
14+
File csvFile = new File(classLoader.getResource("WDIRSCodeList.csv").getFile());
15+
16+
List<String> codes = new ArrayList<>();
17+
18+
try (BufferedReader br = new BufferedReader(new FileReader(csvFile))) {
19+
String line;
20+
boolean firstLine = true;
21+
while ((line = br.readLine()) != null) {
22+
if (firstLine) {
23+
firstLine = false; // Skip header
24+
continue;
25+
}
26+
String[] parts = line.split(";");
27+
if (parts.length >= 1 && !parts[0].trim().isEmpty()) {
28+
codes.add(parts[0].trim()); // Add the code (A, B, C) to list
29+
}
30+
}
31+
} catch (FileNotFoundException e) {
32+
throw new RuntimeException(e);
33+
} catch (IOException e) {
34+
throw new RuntimeException(e);
35+
}
36+
37+
if (codes.isEmpty()) {
38+
fail("No valid dropdown code found in WDIRSCodeList.csv");
39+
}
40+
41+
// Return a random value from the list
42+
Random random = new Random();
43+
return codes.get(random.nextInt(codes.size()));
44+
}
45+
}

0 commit comments

Comments
 (0)