コード例 #1
0
 @Test
 public void testWizardComparatorSinglePositionNullValue() {
   Player p1 = beanFactory.createPlayer().as();
   p1.setWizard2B("2");
   Player p2 = beanFactory.createPlayer().as();
   p2.setWizard1B("1");
   Comparator<Player> desc = PlayerColumn.getWizardComparator(false, EnumSet.of(FB));
   Comparator<Player> asc = PlayerColumn.getWizardComparator(true, EnumSet.of(FB));
   assertComparators(p1, p2, desc, asc);
 }
コード例 #2
0
 @Test
 public void testGetWizardMultiPosition() {
   Player p = beanFactory.createPlayer().as();
   p.setWizard1B("1");
   p.setWizard2B("2");
   Assert.assertEquals("2.0", PlayerColumn.getWizard(p, EnumSet.of(FB, SB, TB)));
 }
コード例 #3
0
 @Test
 public void testGetWizardAllPositions() {
   Player p = beanFactory.createPlayer().as();
   p.setWizard1B("1");
   p.setWizard2B("2");
   p.setWizard3B("3");
   p.setWizardSS("4");
   p.setWizardC("5");
   p.setWizardDH("6");
   p.setWizardOF("7");
   Assert.assertEquals("7.0", PlayerColumn.getWizard(p, EnumSet.noneOf(Position.class)));
 }
コード例 #4
0
 @Test
 public void testGetWizardSinglePosition() {
   Player p = beanFactory.createPlayer().as();
   p.setWizardP("1");
   Assert.assertEquals("1.0", PlayerColumn.getWizard(p, EnumSet.of(P)));
 }