1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 package org.apache.commons.lang3.function;
19
20 import static org.junit.jupiter.api.Assertions.assertEquals;
21 import static org.junit.jupiter.api.Assertions.assertFalse;
22
23 import java.lang.reflect.Method;
24
25 import org.junit.jupiter.api.Test;
26
27
28
29
30 public class MethodInvokersFailableSupplierTest extends MethodFixtures {
31
32 @Test
33 public void testSupplierStatic() throws Throwable {
34 assertEquals(staticGetString(), MethodInvokers.asFailableSupplier(getMethodForStaticGetString()).get());
35 assertEquals(staticGetString(), MethodInvokers.asFailableSupplier(getMethodForStaticGetString()).get());
36 }
37
38 @Test
39 public void testSupplierToString() throws SecurityException, ReflectiveOperationException {
40
41 assertFalse(MethodInvokers.asFailableSupplier(getMethodForStaticGetString()).toString().isEmpty());
42 }
43
44 }