-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathInputTest.java
More file actions
32 lines (29 loc) · 923 Bytes
/
InputTest.java
File metadata and controls
32 lines (29 loc) · 923 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package blocks;
import static org.junit.jupiter.api.Assertions.assertEquals;
import com.google.gson.JsonParser;
import com.slack.api.model.block.InputBlock;
import com.slack.api.util.json.GsonFactory;
import org.junit.jupiter.api.Test;
public class InputTest {
@Test
public void testExample01() {
InputBlock block = Input.example01();
String actual = GsonFactory.createSnakeCase().toJson(block);
String expected = """
{
"type": "input",
"element": {
"type": "plain_text_input",
"multiline": false
},
"label": {
"type": "plain_text",
"text": "Label",
"emoji": true
},
"optional": false
}
""";
assertEquals(JsonParser.parseString(expected), JsonParser.parseString(actual));
}
}