Skip to content

Commit 91a3006

Browse files
committed
2505 platform - core - evaluator - Clean code - remove failing tests that refer to unexisting funcion, remove commented code
1 parent 21b8c9e commit 91a3006

File tree

2 files changed

+0
-38
lines changed

2 files changed

+0
-38
lines changed

server/libs/core/evaluator/src/main/java/com/bytechef/evaluator/Evaluator.java

-2
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,6 @@ private Evaluator(Builder builder) {
122122
map.put("sort", new Sort());
123123
map.put("split", new Split());
124124
map.put("substring", new Substring());
125-
// map.put("systemProperty", new SystemProperty());
126-
// map.put("tempDir", new TempDir());
127125
map.put("timestamp", new Timestamp());
128126
map.put("toMap", new ToMap());
129127
map.put("uuid", new Uuid());

server/libs/core/evaluator/src/test/java/com/bytechef/evaluator/EvaluatorTest.java

-36
Original file line numberDiff line numberDiff line change
@@ -356,22 +356,6 @@ public void test35() {
356356
Assertions.assertEquals(0.5d, MapUtils.getDouble(map, "result"));
357357
}
358358

359-
@Test
360-
public void test36() {
361-
Map<String, Object> map = EVALUATOR.evaluate(
362-
Map.of("type", "type", "number", "=stringf('%03d',5)"), Collections.emptyMap());
363-
364-
Assertions.assertEquals("005", MapUtils.getString(map, "number"));
365-
}
366-
367-
@Test
368-
public void test37() {
369-
Map<String, Object> map = EVALUATOR.evaluate(
370-
Map.of("type", "type", "number", "=stringf('%s %s','hello','world')"), Collections.emptyMap());
371-
372-
Assertions.assertEquals("hello world", MapUtils.getString(map, "number"));
373-
}
374-
375359
@Test
376360
public void test38() {
377361
Map<String, Object> map = EVALUATOR.evaluate(
@@ -438,24 +422,4 @@ public void test42() {
438422
Assertions.assertEquals(2, MapUtils.getInteger(map, "size"));
439423
}
440424

441-
// @Test
442-
// public void test41() {
443-
// Environment environment = mock(Environment.class);
444-
// when(environment.getProperty("my.property")).thenReturn("something");
445-
//
446-
// Map<String, Object> map = EVALUATOR.evaluate(
447-
// Map.of("type", "type", "myValue", "${config('my.property')}"), Collections.emptyMap());
448-
//
449-
// Assertions.assertEquals("something", MapValueUtils.getString(map, "myValue"));
450-
// }
451-
//
452-
// @Test
453-
// public void test42() {
454-
// Environment environment = mock(Environment.class);
455-
// Map<String, Object> map = EVALUATOR.evaluate(
456-
// Map.of("type", "type", "myValue", "${config('no.such.property')}"), Collections.emptyMap());
457-
//
458-
// Assertions.assertEquals(
459-
// "${config('no.such.property')}", MapValueUtils.getString(map, "myValue"));
460-
// }
461425
}

0 commit comments

Comments
 (0)