functional/FXCssTests/test/test/css/controls/api/styles/StylesTreeCellTest.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 import javafx.scene.control.cell.TextFieldTreeCell;
  51 import javafx.util.Callback;
  52 
  53 
  54 /**
  55  * Generation test
  56  * @author sergey.lugovoy@oracle.com
  57  */
  58 public class StylesTreeCellTest extends BaseStyleNodeTest {
  59 
  60     @Override
  61     Node getControl() {
  62         return new GetAction<Node>() {
  63             @Override
  64             public void run(Object... os) throws Exception {
  65                 TreeView view = new TreeView();


  81         Assert.assertEquals(data.getInitialValue(getControl()), javafx.geometry.Pos.CENTER_LEFT);
  82     }
  83 
  84     @Test
  85     public void testfxblendmode () {
  86         Set<String> styleNames = getStyleNames();
  87         Assert.assertNotNull(styleNames);
  88         Assert.assertTrue(styleNames.contains("-fx-blend-mode"));
  89         Map<String, CssMetaData> styles = getStyles();
  90         CssMetaData data = styles.get("-fx-blend-mode");
  91         Assert.assertEquals(data.getInitialValue(getControl()), null);
  92     }
  93 
  94     @Test
  95     public void testfxcellsize () {
  96         Set<String> styleNames = getStyleNames();
  97         Assert.assertNotNull(styleNames);
  98         Assert.assertTrue(styleNames.contains("-fx-cell-size"));
  99         Map<String, CssMetaData> styles = getStyles();
 100         CssMetaData data = styles.get("-fx-cell-size");
 101         Assert.assertEquals(24.0, data.getInitialValue(getControl()));
 102     }
 103 
 104     @Test
 105     public void testfxcontentdisplay () {
 106         Set<String> styleNames = getStyleNames();
 107         Assert.assertNotNull(styleNames);
 108         Assert.assertTrue(styleNames.contains("-fx-content-display"));
 109         Map<String, CssMetaData> styles = getStyles();
 110         CssMetaData data = styles.get("-fx-content-display");
 111         Assert.assertEquals(data.getInitialValue(getControl()), javafx.scene.control.ContentDisplay.LEFT);
 112     }
 113 
 114     @Test
 115     public void testfxcursor () {
 116         Set<String> styleNames = getStyleNames();
 117         Assert.assertNotNull(styleNames);
 118         Assert.assertTrue(styleNames.contains("-fx-cursor"));
 119         Map<String, CssMetaData> styles = getStyles();
 120         CssMetaData data = styles.get("-fx-cursor");
 121         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 import javafx.scene.control.cell.TextFieldTreeCell;
  51 import javafx.util.Callback;
  52 
  53 
  54 /**
  55  * Generation test
  56  * @author sergey.lugovoy@oracle.com
  57  */
  58 public class StylesTreeCellTest extends BaseStyleNodeTest {
  59 
  60     @Override
  61     Node getControl() {
  62         return new GetAction<Node>() {
  63             @Override
  64             public void run(Object... os) throws Exception {
  65                 TreeView view = new TreeView();


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