functional/FXCssTests/test/test/css/controls/api/styles/StylesListCellTest.java

Print this page




  25 package test.css.controls.api.styles;
  26 
  27 import javafx.css.CssMetaData;
  28 import java.util.Map;
  29 import java.util.Set;
  30 import javafx.scene.Node;
  31 import javafx.scene.control.*;
  32 import javafx.scene.layout.*;
  33 import javafx.scene.chart.*;
  34 import javafx.scene.shape.*;
  35 import javafx.scene.web.*;
  36 import javafx.scene.image.*;
  37 import javafx.scene.text.*;
  38 import javafx.scene.*;
  39 import org.junit.Assert;
  40 import org.junit.BeforeClass;
  41 import org.junit.Test;
  42 import org.jemmy.fx.Root;
  43 import org.jemmy.action.GetAction;
  44 import client.test.Keywords;
  45 import com.sun.javafx.scene.control.skin.*;
  46 import javafx.scene.paint.Paint;
  47 import javafx.geometry.Insets;
  48 import com.sun.javafx.scene.layout.region.RepeatStruct;
  49 import com.sun.javafx.scene.layout.region.BorderImageSlices;
  50 
  51 
  52 /**
  53  * Generation test
  54  * @author sergey.lugovoy@oracle.com
  55  */
  56 public class StylesListCellTest extends BaseStyleNodeTest {
  57 
  58     @Override
  59     Node getControl() {
  60         return new GetAction<Node>() {
  61             @Override
  62             public void run(Object... os) throws Exception {
  63                 ListView view = new ListView();
  64                 ListCell cell = new ListCell();
  65                 cell.updateListView(view);


  79         Assert.assertEquals(data.getInitialValue(getControl()), javafx.geometry.Pos.CENTER_LEFT);
  80     }
  81 
  82     @Test
  83     public void testfxblendmode () {
  84         Set<String> styleNames = getStyleNames();
  85         Assert.assertNotNull(styleNames);
  86         Assert.assertTrue(styleNames.contains("-fx-blend-mode"));
  87         Map<String, CssMetaData> styles = getStyles();
  88         CssMetaData data = styles.get("-fx-blend-mode");
  89         Assert.assertEquals(data.getInitialValue(getControl()), null);
  90     }
  91 
  92     @Test
  93     public void testfxcellsize () {
  94         Set<String> styleNames = getStyleNames();
  95         Assert.assertNotNull(styleNames);
  96         Assert.assertTrue(styleNames.contains("-fx-cell-size"));
  97         Map<String, CssMetaData> styles = getStyles();
  98         CssMetaData data = styles.get("-fx-cell-size");
  99         Assert.assertEquals(24.0, data.getInitialValue(getControl()));
 100     }
 101 
 102     @Test
 103     public void testfxcontentdisplay () {
 104         Set<String> styleNames = getStyleNames();
 105         Assert.assertNotNull(styleNames);
 106         Assert.assertTrue(styleNames.contains("-fx-content-display"));
 107         Map<String, CssMetaData> styles = getStyles();
 108         CssMetaData data = styles.get("-fx-content-display");
 109         Assert.assertEquals(data.getInitialValue(getControl()), javafx.scene.control.ContentDisplay.LEFT);
 110     }
 111 
 112     @Test
 113     public void testfxcursor () {
 114         Set<String> styleNames = getStyleNames();
 115         Assert.assertNotNull(styleNames);
 116         Assert.assertTrue(styleNames.contains("-fx-cursor"));
 117         Map<String, CssMetaData> styles = getStyles();
 118         CssMetaData data = styles.get("-fx-cursor");
 119         Assert.assertEquals(data.getInitialValue(getControl()), null);




  25 package test.css.controls.api.styles;
  26 
  27 import javafx.css.CssMetaData;
  28 import java.util.Map;
  29 import java.util.Set;
  30 import javafx.scene.Node;
  31 import javafx.scene.control.*;
  32 import javafx.scene.layout.*;
  33 import javafx.scene.chart.*;
  34 import javafx.scene.shape.*;
  35 import javafx.scene.web.*;
  36 import javafx.scene.image.*;
  37 import javafx.scene.text.*;
  38 import javafx.scene.*;
  39 import org.junit.Assert;
  40 import org.junit.BeforeClass;
  41 import org.junit.Test;
  42 import org.jemmy.fx.Root;
  43 import org.jemmy.action.GetAction;
  44 import client.test.Keywords;
  45 import javafx.scene.control.skin.*;
  46 import javafx.scene.paint.Paint;
  47 import javafx.geometry.Insets;
  48 import com.sun.javafx.scene.layout.region.RepeatStruct;
  49 import com.sun.javafx.scene.layout.region.BorderImageSlices;
  50 
  51 
  52 /**
  53  * Generation test
  54  * @author sergey.lugovoy@oracle.com
  55  */
  56 public class StylesListCellTest extends BaseStyleNodeTest {
  57 
  58     @Override
  59     Node getControl() {
  60         return new GetAction<Node>() {
  61             @Override
  62             public void run(Object... os) throws Exception {
  63                 ListView view = new ListView();
  64                 ListCell cell = new ListCell();
  65                 cell.updateListView(view);


  79         Assert.assertEquals(data.getInitialValue(getControl()), javafx.geometry.Pos.CENTER_LEFT);
  80     }
  81 
  82     @Test
  83     public void testfxblendmode () {
  84         Set<String> styleNames = getStyleNames();
  85         Assert.assertNotNull(styleNames);
  86         Assert.assertTrue(styleNames.contains("-fx-blend-mode"));
  87         Map<String, CssMetaData> styles = getStyles();
  88         CssMetaData data = styles.get("-fx-blend-mode");
  89         Assert.assertEquals(data.getInitialValue(getControl()), null);
  90     }
  91 
  92     @Test
  93     public void testfxcellsize () {
  94         Set<String> styleNames = getStyleNames();
  95         Assert.assertNotNull(styleNames);
  96         Assert.assertTrue(styleNames.contains("-fx-cell-size"));
  97         Map<String, CssMetaData> styles = getStyles();
  98         CssMetaData data = styles.get("-fx-cell-size");
  99         Assert.assertEquals(data.getInitialValue(getControl()), "15");
 100     }
 101 
 102     @Test
 103     public void testfxcontentdisplay () {
 104         Set<String> styleNames = getStyleNames();
 105         Assert.assertNotNull(styleNames);
 106         Assert.assertTrue(styleNames.contains("-fx-content-display"));
 107         Map<String, CssMetaData> styles = getStyles();
 108         CssMetaData data = styles.get("-fx-content-display");
 109         Assert.assertEquals(data.getInitialValue(getControl()), javafx.scene.control.ContentDisplay.LEFT);
 110     }
 111 
 112     @Test
 113     public void testfxcursor () {
 114         Set<String> styleNames = getStyleNames();
 115         Assert.assertNotNull(styleNames);
 116         Assert.assertTrue(styleNames.contains("-fx-cursor"));
 117         Map<String, CssMetaData> styles = getStyles();
 118         CssMetaData data = styles.get("-fx-cursor");
 119         Assert.assertEquals(data.getInitialValue(getControl()), null);