View Javadoc
1   /*
2    * Copyright (C) 2022-2023 Dipl.-Inform. Kai Hofmann. All rights reserved!
3    */
4   package de.powerstat.validation.values.test;
5   
6   
7   import static org.junit.jupiter.api.Assertions.assertAll;
8   import static org.junit.jupiter.api.Assertions.assertEquals;
9   import static org.junit.jupiter.api.Assertions.assertFalse;
10  import static org.junit.jupiter.api.Assertions.assertTrue;
11  
12  import org.junit.jupiter.api.Test;
13  
14  import de.powerstat.validation.values.BloodGroup;
15  
16  
17  /**
18   * Gender tests.
19   */
20  final class BloodGroupTests
21   {
22    /**
23     * Compatible blood groups.
24     */
25    private static final String BG_ABPABP_OK = "AB+ with AB+ should be ok"; //$NON-NLS-1$
26  
27    /**
28     * Compatible blood groups.
29     */
30    private static final String BG_ABNABP_OK = "AB- with AB+ should be ok"; //$NON-NLS-1$
31  
32    /**
33     * Compatible blood groups.
34     */
35    private static final String BG_ABNABN_OK = "AB- with AB- should be ok"; //$NON-NLS-1$
36  
37    /**
38     * Compatible blood groups.
39     */
40    private static final String BG_APAP_OK = "A+ with A+ should be ok"; //$NON-NLS-1$
41  
42    /**
43     * Compatible blood groups.
44     */
45    private static final String BG_ANAN_OK = "A- with A- should be ok"; //$NON-NLS-1$
46  
47    /**
48     * Compatible blood groups.
49     */
50    private static final String BG_BPBP_OK = "B+ with B+ should be ok"; //$NON-NLS-1$
51  
52    /**
53     * Compatible blood groups.
54     */
55    private static final String BG_BNBN_OK = "B- with B- should be ok"; //$NON-NLS-1$
56  
57    /**
58     * Compatible blood groups.
59     */
60    private static final String BG_0P0P_OK = "0+ with 0+ should be ok"; //$NON-NLS-1$
61  
62    /**
63     * Compatible blood groups.
64     */
65    private static final String BG_0N0N_OK = "0- with 0- should be ok"; //$NON-NLS-1$
66  
67    /**
68     * Incompatible bllod groups.
69     */
70    private static final String BG_ABNAP_NOT_OK = "AB- with A+ should not be ok"; //$NON-NLS-1$
71  
72    /**
73     * Incompatible bllod groups.
74     */
75    private static final String BG_ABNBP_NOT_OK = "AB- with B+ should not be ok"; //$NON-NLS-1$
76  
77    /**
78     * Incompatible bllod groups.
79     */
80    private static final String BG_ABN0P_NOT_OK = "AB- with 0+ should not be ok"; //$NON-NLS-1$
81  
82    /**
83     * Incompatible bllod groups.
84     */
85    private static final String BG_APABN_NOT_OK = "A+ with AB- should not be ok"; //$NON-NLS-1$
86  
87    /**
88     * Incompatible bllod groups.
89     */
90    private static final String BG_APBP_NOT_OK = "A+ with B+ should not be ok"; //$NON-NLS-1$
91  
92    /**
93     * Incompatible bllod groups.
94     */
95    private static final String BG_APBN_NOT_OK = "A+ with B- should not be ok"; //$NON-NLS-1$
96  
97    /**
98     * Incompatible bllod groups.
99     */
100   private static final String BG_ANBP_NOT_OK = "A- with B+ should not be ok"; //$NON-NLS-1$
101 
102   /**
103    * Incompatible bllod groups.
104    */
105   private static final String BG_ANBN_NOT_OK = "A- with B- should not be ok"; //$NON-NLS-1$
106 
107   /**
108    * Incompatible bllod groups.
109    */
110   private static final String BG_AN0P_NOT_OK = "A- with 0+ should not be ok"; //$NON-NLS-1$
111 
112   /**
113    * Incompatible bllod groups.
114    */
115   private static final String BG_BPABN_NOT_OK = "B+ with AB- should not be ok"; //$NON-NLS-1$
116 
117   /**
118    * Incompatible bllod groups.
119    */
120   private static final String BG_BPAP_NOT_OK = "B+ with A+ should not be ok"; //$NON-NLS-1$
121 
122   /**
123    * Incompatible bllod groups.
124    */
125   private static final String BG_BPAN_NOT_OK = "B+ with A- should not be ok"; //$NON-NLS-1$
126 
127   /**
128    * Incompatible bllod groups.
129    */
130   private static final String BG_BNAP_NOT_OK = "B- with A+ should not be ok"; //$NON-NLS-1$
131 
132   /**
133    * Incompatible bllod groups.
134    */
135   private static final String BG_BNAN_NOT_OK = "B- with A- should not be ok"; //$NON-NLS-1$
136 
137   /**
138    * Incompatible bllod groups.
139    */
140   private static final String BG_BN0P_NOT_OK = "B- with 0+ should not be ok"; //$NON-NLS-1$
141 
142   /**
143    * Incompatible bllod groups.
144    */
145   private static final String BG_0PABN_NOT_OK = "0+ with AB- should not be ok"; //$NON-NLS-1$
146 
147   /**
148    * Incompatible bllod groups.
149    */
150   private static final String BG_0PAN_NOT_OK = "0+ with A- should not be ok"; //$NON-NLS-1$
151 
152   /**
153    * Incompatible bllod groups.
154    */
155   private static final String BG_0PBN_NOT_OK = "0+ with B- should not be ok"; //$NON-NLS-1$
156 
157   /**
158    * ON constant.
159    */
160   private static final String ON = "ON"; //$NON-NLS-1$
161 
162   /**
163    * 0- action not as expected constant.
164    */
165   private static final String ZERO_NEGATIVE_ACTION_NOT_AS_EXPECTED = "0- action not as expected";
166 
167 
168   /**
169    * Default constructor.
170    */
171   /* default */ BloodGroupTests()
172    {
173     super();
174    }
175 
176 
177   /**
178    * Factory string test.
179    */
180   @Test
181   /* default */ void testFactory1()
182    {
183     assertEquals(0, BloodGroup.of(ON).getAction(), ZERO_NEGATIVE_ACTION_NOT_AS_EXPECTED);
184    }
185 
186 
187   /**
188    * Test getAction of BloodGroup.
189    */
190   @Test
191   /* default */ void testGetAction()
192    {
193     assertAll("getAction", //$NON-NLS-1$
194       () -> assertEquals(0, BloodGroup.ON.getAction(), ZERO_NEGATIVE_ACTION_NOT_AS_EXPECTED),
195       () -> assertEquals(1, BloodGroup.OP.getAction(), "0+ action not as expected"), //$NON-NLS-1$
196       () -> assertEquals(2, BloodGroup.AN.getAction(), "A- action not as expected"), //$NON-NLS-1$
197       () -> assertEquals(3, BloodGroup.AP.getAction(), "A+ action not as expected"), //$NON-NLS-1$
198       () -> assertEquals(4, BloodGroup.BN.getAction(), "B- action not as expected"), //$NON-NLS-1$
199       () -> assertEquals(5, BloodGroup.BP.getAction(), "B+ action not as expected"), //$NON-NLS-1$
200       () -> assertEquals(6, BloodGroup.ABN.getAction(), "AB- action not as expected"), //$NON-NLS-1$
201       () -> assertEquals(7, BloodGroup.ABP.getAction(), "AB+ action not as expected") //$NON-NLS-1$
202     );
203    }
204 
205 
206   /**
207    * Test stringValue.
208    */
209   @Test
210   /* default */ void testStringValue()
211    {
212     final BloodGroup group = BloodGroup.ON;
213     assertEquals(ON, group.stringValue(), "stringValue not as expected");
214    }
215 
216 
217   /**
218    * Test could donate to.
219    */
220   @SuppressWarnings("PMD.JUnitTestContainsTooManyAsserts")
221   @Test
222   /* default */ void testCouldDonateTo()
223    {
224     assertAll("couldDonateTo", //$NON-NLS-1$
225       () -> assertTrue(BloodGroup.ON.couldDonateTo(BloodGroup.ON), BloodGroupTests.BG_0N0N_OK),
226       () -> assertTrue(BloodGroup.ON.couldDonateTo(BloodGroup.OP), "0- with 0+ should be ok"), //$NON-NLS-1$
227       () -> assertTrue(BloodGroup.ON.couldDonateTo(BloodGroup.BN), "0- with B- should be ok"), //$NON-NLS-1$
228       () -> assertTrue(BloodGroup.ON.couldDonateTo(BloodGroup.BP), "0- with B+ should be ok"), //$NON-NLS-1$
229       () -> assertTrue(BloodGroup.ON.couldDonateTo(BloodGroup.AN), "0- with A- should be ok"), //$NON-NLS-1$
230       () -> assertTrue(BloodGroup.ON.couldDonateTo(BloodGroup.AP), "0- with A+ should be ok"), //$NON-NLS-1$
231       () -> assertTrue(BloodGroup.ON.couldDonateTo(BloodGroup.ABN), "0- with AB- should be ok"), //$NON-NLS-1$
232       () -> assertTrue(BloodGroup.ON.couldDonateTo(BloodGroup.ABP), "0- with AB+ should be ok"), //$NON-NLS-1$
233 
234       () -> assertFalse(BloodGroup.OP.couldDonateTo(BloodGroup.ON), "0+ with 0- should not be ok"), //$NON-NLS-1$
235       () -> assertTrue(BloodGroup.OP.couldDonateTo(BloodGroup.OP), BloodGroupTests.BG_0P0P_OK),
236       () -> assertFalse(BloodGroup.OP.couldDonateTo(BloodGroup.BN), BloodGroupTests.BG_0PBN_NOT_OK),
237       () -> assertTrue(BloodGroup.OP.couldDonateTo(BloodGroup.BP), "0+ with B+ should be ok"), //$NON-NLS-1$
238       () -> assertFalse(BloodGroup.OP.couldDonateTo(BloodGroup.AN), BloodGroupTests.BG_0PAN_NOT_OK),
239       () -> assertTrue(BloodGroup.OP.couldDonateTo(BloodGroup.AP), "0+ with A+ should be ok"), //$NON-NLS-1$
240       () -> assertFalse(BloodGroup.OP.couldDonateTo(BloodGroup.ABN), BloodGroupTests.BG_0PABN_NOT_OK),
241       () -> assertTrue(BloodGroup.OP.couldDonateTo(BloodGroup.ABP), "0+ with AB+ should be ok"), //$NON-NLS-1$
242 
243       () -> assertFalse(BloodGroup.BN.couldDonateTo(BloodGroup.ON), "B- with 0- should not be ok"), //$NON-NLS-1$
244       () -> assertFalse(BloodGroup.BN.couldDonateTo(BloodGroup.OP), BloodGroupTests.BG_BN0P_NOT_OK),
245       () -> assertTrue(BloodGroup.BN.couldDonateTo(BloodGroup.BN), BloodGroupTests.BG_BNBN_OK),
246       () -> assertTrue(BloodGroup.BN.couldDonateTo(BloodGroup.BP), "B- with B+ should be ok"), //$NON-NLS-1$
247       () -> assertFalse(BloodGroup.BN.couldDonateTo(BloodGroup.AN), BloodGroupTests.BG_BNAN_NOT_OK),
248       () -> assertFalse(BloodGroup.BN.couldDonateTo(BloodGroup.AP), BloodGroupTests.BG_BNAP_NOT_OK),
249       () -> assertTrue(BloodGroup.BN.couldDonateTo(BloodGroup.ABN), "B- with AB- should be ok"), //$NON-NLS-1$
250       () -> assertTrue(BloodGroup.BN.couldDonateTo(BloodGroup.ABP), "B- with AB+ should be ok"), //$NON-NLS-1$
251 
252       () -> assertFalse(BloodGroup.BP.couldDonateTo(BloodGroup.ON), "B+ with 0- should not be ok"), //$NON-NLS-1$
253       () -> assertFalse(BloodGroup.BP.couldDonateTo(BloodGroup.OP), "B+ with 0+ should not be ok"), //$NON-NLS-1$
254       () -> assertFalse(BloodGroup.BP.couldDonateTo(BloodGroup.BN), "B+ with B- should not be ok"), //$NON-NLS-1$
255       () -> assertTrue(BloodGroup.BP.couldDonateTo(BloodGroup.BP), BloodGroupTests.BG_BPBP_OK),
256       () -> assertFalse(BloodGroup.BP.couldDonateTo(BloodGroup.AN), BloodGroupTests.BG_BPAN_NOT_OK),
257       () -> assertFalse(BloodGroup.BP.couldDonateTo(BloodGroup.AP), BloodGroupTests.BG_BPAP_NOT_OK),
258       () -> assertFalse(BloodGroup.BP.couldDonateTo(BloodGroup.ABN), BloodGroupTests.BG_BPABN_NOT_OK),
259       () -> assertTrue(BloodGroup.BP.couldDonateTo(BloodGroup.ABP), "B+ with AB+ should be ok"), //$NON-NLS-1$
260 
261       () -> assertFalse(BloodGroup.AN.couldDonateTo(BloodGroup.ON), "A- with 0- should not be ok"), //$NON-NLS-1$
262       () -> assertFalse(BloodGroup.AN.couldDonateTo(BloodGroup.OP), BloodGroupTests.BG_AN0P_NOT_OK),
263       () -> assertFalse(BloodGroup.AN.couldDonateTo(BloodGroup.BN), BloodGroupTests.BG_ANBN_NOT_OK),
264       () -> assertFalse(BloodGroup.AN.couldDonateTo(BloodGroup.BP), BloodGroupTests.BG_ANBP_NOT_OK),
265       () -> assertTrue(BloodGroup.AN.couldDonateTo(BloodGroup.AN), BloodGroupTests.BG_ANAN_OK),
266       () -> assertTrue(BloodGroup.AN.couldDonateTo(BloodGroup.AP), "A- with A+ should be ok"), //$NON-NLS-1$
267       () -> assertTrue(BloodGroup.AN.couldDonateTo(BloodGroup.ABN), "A- with AB- should be ok"), //$NON-NLS-1$
268       () -> assertTrue(BloodGroup.AN.couldDonateTo(BloodGroup.ABP), "A- with AB+ should be ok"), //$NON-NLS-1$
269 
270       () -> assertFalse(BloodGroup.AP.couldDonateTo(BloodGroup.ON), "A+ with 0- should not be ok"), //$NON-NLS-1$
271       () -> assertFalse(BloodGroup.AP.couldDonateTo(BloodGroup.OP), "A+ with 0+ should not be ok"), //$NON-NLS-1$
272       () -> assertFalse(BloodGroup.AP.couldDonateTo(BloodGroup.BN), BloodGroupTests.BG_APBN_NOT_OK),
273       () -> assertFalse(BloodGroup.AP.couldDonateTo(BloodGroup.BP), BloodGroupTests.BG_APBP_NOT_OK),
274       () -> assertFalse(BloodGroup.AP.couldDonateTo(BloodGroup.AN), "A+ with A- should not be ok"), //$NON-NLS-1$
275       () -> assertTrue(BloodGroup.AP.couldDonateTo(BloodGroup.AP), BloodGroupTests.BG_APAP_OK),
276       () -> assertFalse(BloodGroup.AP.couldDonateTo(BloodGroup.ABN), BloodGroupTests.BG_APABN_NOT_OK),
277       () -> assertTrue(BloodGroup.AP.couldDonateTo(BloodGroup.ABP), "A+ with AB+ should be ok"), //$NON-NLS-1$
278 
279       () -> assertFalse(BloodGroup.ABN.couldDonateTo(BloodGroup.ON), "AB- with 0- should not be ok"), //$NON-NLS-1$
280       () -> assertFalse(BloodGroup.ABN.couldDonateTo(BloodGroup.OP), BloodGroupTests.BG_ABN0P_NOT_OK),
281       () -> assertFalse(BloodGroup.ABN.couldDonateTo(BloodGroup.BN), "AB- with B- should not be ok"), //$NON-NLS-1$
282       () -> assertFalse(BloodGroup.ABN.couldDonateTo(BloodGroup.BP), BloodGroupTests.BG_ABNBP_NOT_OK),
283       () -> assertFalse(BloodGroup.ABN.couldDonateTo(BloodGroup.AN), "AB- with A- should not be ok"), //$NON-NLS-1$
284       () -> assertFalse(BloodGroup.ABN.couldDonateTo(BloodGroup.AP), BloodGroupTests.BG_ABNAP_NOT_OK),
285       () -> assertTrue(BloodGroup.ABN.couldDonateTo(BloodGroup.ABN), BloodGroupTests.BG_ABNABN_OK),
286       () -> assertTrue(BloodGroup.ABN.couldDonateTo(BloodGroup.ABP), BloodGroupTests.BG_ABNABP_OK),
287 
288       () -> assertFalse(BloodGroup.ABP.couldDonateTo(BloodGroup.ON), "AB+ with 0- should not be ok"), //$NON-NLS-1$
289       () -> assertFalse(BloodGroup.ABP.couldDonateTo(BloodGroup.OP), "AB+ with 0+ should not be ok"), //$NON-NLS-1$
290       () -> assertFalse(BloodGroup.ABP.couldDonateTo(BloodGroup.BN), "AB+ with B- should not be ok"), //$NON-NLS-1$
291       () -> assertFalse(BloodGroup.ABP.couldDonateTo(BloodGroup.BP), "AB+ with B+ should not be ok"), //$NON-NLS-1$
292       () -> assertFalse(BloodGroup.ABP.couldDonateTo(BloodGroup.AN), "AB+ with A- should not be ok"), //$NON-NLS-1$
293       () -> assertFalse(BloodGroup.ABP.couldDonateTo(BloodGroup.AP), "AB+ with A+ should not be ok"), //$NON-NLS-1$
294       () -> assertFalse(BloodGroup.ABP.couldDonateTo(BloodGroup.ABN), "AB+ with AB- should not be ok"), //$NON-NLS-1$
295       () -> assertTrue(BloodGroup.ABP.couldDonateTo(BloodGroup.ABP), BloodGroupTests.BG_ABPABP_OK)
296     );
297    }
298 
299 
300   /**
301    * Test could receive from.
302    */
303   @SuppressWarnings("PMD.JUnitTestContainsTooManyAsserts")
304   @Test
305   /* default */ void testCouldReceiveFrom()
306    {
307     assertAll("couldReceiveFrom", //$NON-NLS-1$
308       () -> assertTrue(BloodGroup.ON.couldReceiveFrom(BloodGroup.ON), BloodGroupTests.BG_0N0N_OK),
309       () -> assertFalse(BloodGroup.ON.couldReceiveFrom(BloodGroup.OP), "0- with 0+ should not be ok"), //$NON-NLS-1$
310       () -> assertFalse(BloodGroup.ON.couldReceiveFrom(BloodGroup.BN), "0- with B- should not be ok"), //$NON-NLS-1$
311       () -> assertFalse(BloodGroup.ON.couldReceiveFrom(BloodGroup.BP), "0- with B+ should not be ok"), //$NON-NLS-1$
312       () -> assertFalse(BloodGroup.ON.couldReceiveFrom(BloodGroup.AN), "0- with A- should not be ok"), //$NON-NLS-1$
313       () -> assertFalse(BloodGroup.ON.couldReceiveFrom(BloodGroup.AP), "0- with A+ should not be ok"), //$NON-NLS-1$
314       () -> assertFalse(BloodGroup.ON.couldReceiveFrom(BloodGroup.ABN), "0- with AB- should not be ok"), //$NON-NLS-1$
315       () -> assertFalse(BloodGroup.ON.couldReceiveFrom(BloodGroup.ABP), "0- with AB+ should not be ok"), //$NON-NLS-1$
316 
317       () -> assertTrue(BloodGroup.OP.couldReceiveFrom(BloodGroup.ON), "0+ with 0- should be ok"), //$NON-NLS-1$
318       () -> assertTrue(BloodGroup.OP.couldReceiveFrom(BloodGroup.OP), BloodGroupTests.BG_0P0P_OK),
319       () -> assertFalse(BloodGroup.OP.couldReceiveFrom(BloodGroup.BN), BloodGroupTests.BG_0PBN_NOT_OK),
320       () -> assertFalse(BloodGroup.OP.couldReceiveFrom(BloodGroup.BP), "0+ with B+ should not be ok"), //$NON-NLS-1$
321       () -> assertFalse(BloodGroup.OP.couldReceiveFrom(BloodGroup.AN), BloodGroupTests.BG_0PAN_NOT_OK),
322       () -> assertFalse(BloodGroup.OP.couldReceiveFrom(BloodGroup.AP), "0+ with A+ should not be ok"), //$NON-NLS-1$
323       () -> assertFalse(BloodGroup.OP.couldReceiveFrom(BloodGroup.ABN), BloodGroupTests.BG_0PABN_NOT_OK),
324       () -> assertFalse(BloodGroup.OP.couldReceiveFrom(BloodGroup.ABP), "0+ with AB+ should not be ok"), //$NON-NLS-1$
325 
326       () -> assertTrue(BloodGroup.BN.couldReceiveFrom(BloodGroup.ON), "B- with 0- should be ok"), //$NON-NLS-1$
327       () -> assertFalse(BloodGroup.BN.couldReceiveFrom(BloodGroup.OP), BloodGroupTests.BG_BN0P_NOT_OK),
328       () -> assertTrue(BloodGroup.BN.couldReceiveFrom(BloodGroup.BN), BloodGroupTests.BG_BNBN_OK),
329       () -> assertFalse(BloodGroup.BN.couldReceiveFrom(BloodGroup.BP), "B- with B+ should not be ok"), //$NON-NLS-1$
330       () -> assertFalse(BloodGroup.BN.couldReceiveFrom(BloodGroup.AN), BloodGroupTests.BG_BNAN_NOT_OK),
331       () -> assertFalse(BloodGroup.BN.couldReceiveFrom(BloodGroup.AP), BloodGroupTests.BG_BNAP_NOT_OK),
332       () -> assertFalse(BloodGroup.BN.couldReceiveFrom(BloodGroup.ABN), "B- with AB- should not be ok"), //$NON-NLS-1$
333       () -> assertFalse(BloodGroup.BN.couldReceiveFrom(BloodGroup.ABP), "B- with AB+ should not be ok"), //$NON-NLS-1$
334 
335       () -> assertTrue(BloodGroup.BP.couldReceiveFrom(BloodGroup.ON), "B+ with 0- should be ok"), //$NON-NLS-1$
336       () -> assertTrue(BloodGroup.BP.couldReceiveFrom(BloodGroup.OP), "B+ with 0+ should be ok"), //$NON-NLS-1$
337       () -> assertTrue(BloodGroup.BP.couldReceiveFrom(BloodGroup.BN), "B+ with B- should be ok"), //$NON-NLS-1$
338       () -> assertTrue(BloodGroup.BP.couldReceiveFrom(BloodGroup.BP), BloodGroupTests.BG_BPBP_OK),
339       () -> assertFalse(BloodGroup.BP.couldReceiveFrom(BloodGroup.AN), BloodGroupTests.BG_BPAN_NOT_OK),
340       () -> assertFalse(BloodGroup.BP.couldReceiveFrom(BloodGroup.AP), BloodGroupTests.BG_BPAP_NOT_OK),
341       () -> assertFalse(BloodGroup.BP.couldReceiveFrom(BloodGroup.ABN), BloodGroupTests.BG_BPABN_NOT_OK),
342       () -> assertFalse(BloodGroup.BP.couldReceiveFrom(BloodGroup.ABP), "B+ with AB+ should not be ok"), //$NON-NLS-1$
343 
344       () -> assertTrue(BloodGroup.AN.couldReceiveFrom(BloodGroup.ON), "A- with 0- should be ok"), //$NON-NLS-1$
345       () -> assertFalse(BloodGroup.AN.couldReceiveFrom(BloodGroup.OP), BloodGroupTests.BG_AN0P_NOT_OK),
346       () -> assertFalse(BloodGroup.AN.couldReceiveFrom(BloodGroup.BN), BloodGroupTests.BG_ANBN_NOT_OK),
347       () -> assertFalse(BloodGroup.AN.couldReceiveFrom(BloodGroup.BP), BloodGroupTests.BG_ANBP_NOT_OK),
348       () -> assertTrue(BloodGroup.AN.couldReceiveFrom(BloodGroup.AN), BloodGroupTests.BG_ANAN_OK),
349       () -> assertFalse(BloodGroup.AN.couldReceiveFrom(BloodGroup.AP), "A- with A+ should not be ok"), //$NON-NLS-1$
350       () -> assertFalse(BloodGroup.AN.couldReceiveFrom(BloodGroup.ABN), "A- with AB- should not be ok"), //$NON-NLS-1$
351       () -> assertFalse(BloodGroup.AN.couldReceiveFrom(BloodGroup.ABP), "A- with AB+ should not be ok"), //$NON-NLS-1$
352 
353       () -> assertTrue(BloodGroup.AP.couldReceiveFrom(BloodGroup.ON), "A+ with 0- should be ok"), //$NON-NLS-1$
354       () -> assertTrue(BloodGroup.AP.couldReceiveFrom(BloodGroup.OP), "A+ with 0+ should be ok"), //$NON-NLS-1$
355       () -> assertFalse(BloodGroup.AP.couldReceiveFrom(BloodGroup.BN), BloodGroupTests.BG_APBN_NOT_OK),
356       () -> assertFalse(BloodGroup.AP.couldReceiveFrom(BloodGroup.BP), BloodGroupTests.BG_APBP_NOT_OK),
357       () -> assertTrue(BloodGroup.AP.couldReceiveFrom(BloodGroup.AN), "A+ with A- should be ok"), //$NON-NLS-1$
358       () -> assertTrue(BloodGroup.AP.couldReceiveFrom(BloodGroup.AP), BloodGroupTests.BG_APAP_OK),
359       () -> assertFalse(BloodGroup.AP.couldReceiveFrom(BloodGroup.ABN), BloodGroupTests.BG_APABN_NOT_OK),
360       () -> assertFalse(BloodGroup.AP.couldReceiveFrom(BloodGroup.ABP), "A+ with AB+ should not be ok"), //$NON-NLS-1$
361 
362       () -> assertTrue(BloodGroup.ABN.couldReceiveFrom(BloodGroup.ON), "AB- with 0- should be ok"), //$NON-NLS-1$
363       () -> assertFalse(BloodGroup.ABN.couldReceiveFrom(BloodGroup.OP), BloodGroupTests.BG_ABN0P_NOT_OK),
364       () -> assertTrue(BloodGroup.ABN.couldReceiveFrom(BloodGroup.BN), "AB- with B- should be ok"), //$NON-NLS-1$
365       () -> assertFalse(BloodGroup.ABN.couldReceiveFrom(BloodGroup.BP), BloodGroupTests.BG_ABNBP_NOT_OK),
366       () -> assertTrue(BloodGroup.ABN.couldReceiveFrom(BloodGroup.AN), "AB- with A- should be ok"), //$NON-NLS-1$
367       () -> assertFalse(BloodGroup.ABN.couldReceiveFrom(BloodGroup.AP), BloodGroupTests.BG_ABNAP_NOT_OK),
368       () -> assertTrue(BloodGroup.ABN.couldReceiveFrom(BloodGroup.ABN), BloodGroupTests.BG_ABNABN_OK),
369       () -> assertFalse(BloodGroup.ABN.couldReceiveFrom(BloodGroup.ABP), "AB- with AB+ should not be ok"), //$NON-NLS-1$
370 
371       () -> assertTrue(BloodGroup.ABP.couldReceiveFrom(BloodGroup.ON), "AB+ with 0- should be ok"), //$NON-NLS-1$
372       () -> assertTrue(BloodGroup.ABP.couldReceiveFrom(BloodGroup.OP), "AB+ with 0+ should be ok"), //$NON-NLS-1$
373       () -> assertTrue(BloodGroup.ABP.couldReceiveFrom(BloodGroup.BN), "AB+ with B- should be ok"), //$NON-NLS-1$
374       () -> assertTrue(BloodGroup.ABP.couldReceiveFrom(BloodGroup.BP), "AB+ with B+ should be ok"), //$NON-NLS-1$
375       () -> assertTrue(BloodGroup.ABP.couldReceiveFrom(BloodGroup.AN), "AB+ with A- should be ok"), //$NON-NLS-1$
376       () -> assertTrue(BloodGroup.ABP.couldReceiveFrom(BloodGroup.AP), "AB+ with A+ should be ok"), //$NON-NLS-1$
377       () -> assertTrue(BloodGroup.ABP.couldReceiveFrom(BloodGroup.ABN), "AB+ with AB- should be ok"), //$NON-NLS-1$
378       () -> assertTrue(BloodGroup.ABP.couldReceiveFrom(BloodGroup.ABP), BloodGroupTests.BG_ABPABP_OK)
379     );
380    }
381 
382  }