001: /*
002: * SLDStyleFactoryTest.java
003: * JUnit based test
004: *
005: * Created on September 29, 2005, 3:10 PM
006: */
007:
008: package org.geotools.renderer.style;
009:
010: import junit.framework.Test;
011: import junit.framework.TestCase;
012: import junit.framework.TestSuite;
013:
014: import org.geotools.filter.FilterFactoryFinder;
015: import org.geotools.styling.Mark;
016: import org.geotools.styling.PointSymbolizer;
017: import org.geotools.styling.PolygonSymbolizer;
018: import org.geotools.styling.StyleFactory;
019: import org.geotools.styling.StyleFactoryFinder;
020: import org.geotools.util.NumberRange;
021:
022: /**
023: *
024: * @author jamesm
025: * @source $URL: http://svn.geotools.org/geotools/tags/2.4.1/modules/library/render/src/test/java/org/geotools/renderer/style/SLDStyleFactoryTest.java $
026: */
027: public class SLDStyleFactoryTest extends TestCase {
028:
029: public SLDStyleFactoryTest(String testName) {
030: super (testName);
031: }
032:
033: protected void setUp() throws Exception {
034: }
035:
036: protected void tearDown() throws Exception {
037: }
038:
039: public static class SymbolizerKeyTest extends TestCase {
040:
041: public SymbolizerKeyTest(java.lang.String testName) {
042:
043: super (testName);
044: }
045:
046: protected void setUp() throws Exception {
047: }
048:
049: protected void tearDown() throws Exception {
050: }
051:
052: public static Test suite() {
053: TestSuite suite = new TestSuite(SymbolizerKeyTest.class);
054:
055: return suite;
056: }
057:
058: /**
059: * Test of equals method, of class org.geotools.renderer.style.SLDStyleFactory.SymbolizerKey.
060: */
061: public void testEquals() {
062:
063: // TODO add your test code below by replacing the default call to fail.
064: }
065:
066: /**
067: * Test of hashCode method, of class org.geotools.renderer.style.SLDStyleFactory.SymbolizerKey.
068: */
069: public void testHashCode() {
070:
071: // TODO add your test code below by replacing the default call to fail.
072: }
073: }
074:
075: public static Test suite() {
076: TestSuite suite = new TestSuite(SLDStyleFactoryTest.class);
077:
078: return suite;
079: }
080:
081: /**
082: * Test of getHitRatio method, of class org.geotools.renderer.style.SLDStyleFactory.
083: */
084: public void testGetHitRatio() {
085:
086: // TODO add your test code below by replacing the default call to fail.
087: }
088:
089: /**
090: * Test of getHits method, of class org.geotools.renderer.style.SLDStyleFactory.
091: */
092: public void testGetHits() {
093:
094: // TODO add your test code below by replacing the default call to fail.
095: }
096:
097: /**
098: * Test of getRequests method, of class org.geotools.renderer.style.SLDStyleFactory.
099: */
100: public void testGetRequests() {
101:
102: // TODO add your test code below by replacing the default call to fail.
103: }
104:
105: /**
106: * Test of createStyle method, of class org.geotools.renderer.style.SLDStyleFactory.
107: */
108: public void testCreateStyle() {
109:
110: // TODO add your test code below by replacing the default call to fail.
111: }
112:
113: /**
114: * Test of createDynamicStyle method, of class org.geotools.renderer.style.SLDStyleFactory.
115: */
116: public void testCreateDynamicStyle() {
117:
118: // TODO add your test code below by replacing the default call to fail.
119: }
120:
121: /**
122: * Test of createPolygonStyle method, of class org.geotools.renderer.style.SLDStyleFactory.
123: */
124: public void testCreateIncompletePolygonStyle() {
125: SLDStyleFactory sFac = new SLDStyleFactory();
126: NumberRange range = new NumberRange(1, 1);
127:
128: PolygonSymbolizer symb;
129:
130: //full symbolizer
131: symb = StyleFactoryFinder.createStyleFactory()
132: .createPolygonSymbolizer();
133: //symb.setFill(fac.createFill(FilterFactoryFinder.createFilterFactory().createLiteralExpression("#ffff00")));
134:
135: sFac.createPolygonStyle(null, symb, range);
136: }
137:
138: /**
139: * Test of createDynamicPolygonStyle method, of class org.geotools.renderer.style.SLDStyleFactory.
140: */
141: public void testCreateDynamicPolygonStyle() {
142:
143: // TODO add your test code below by replacing the default call to fail.
144: }
145:
146: /**
147: * Test of createLineStyle method, of class org.geotools.renderer.style.SLDStyleFactory.
148: */
149: public void testCreateLineStyle() {
150:
151: // TODO add your test code below by replacing the default call to fail.
152: }
153:
154: /**
155: * Test of createDynamicLineStyle method, of class org.geotools.renderer.style.SLDStyleFactory.
156: */
157: public void testCreateDynamicLineStyle() {
158:
159: // TODO add your test code below by replacing the default call to fail.
160: }
161:
162: /**
163: * Test of createPointStyle method, of class org.geotools.renderer.style.SLDStyleFactory.
164: */
165: public void testCreateCompletePointStyle() {
166: SLDStyleFactory sFac = new SLDStyleFactory();
167: NumberRange range = new NumberRange(1, 1);
168: StyleFactory fac = StyleFactoryFinder.createStyleFactory();
169:
170: PointSymbolizer symb;
171: Mark myMark;
172: //full symbolizer
173: symb = StyleFactoryFinder.createStyleFactory()
174: .createPointSymbolizer();
175: myMark = fac.createMark();
176: myMark.setFill(fac.createFill(FilterFactoryFinder
177: .createFilterFactory().createLiteralExpression(
178: "#ffff00")));
179: symb.getGraphic().setSize(
180: FilterFactoryFinder.createFilterFactory()
181: .createLiteralExpression(10));
182: symb.getGraphic().addMark(myMark);
183: symb.getGraphic().setOpacity(
184: FilterFactoryFinder.createFilterFactory()
185: .createLiteralExpression(1));
186: symb.getGraphic().setRotation(
187: FilterFactoryFinder.createFilterFactory()
188: .createLiteralExpression(0));
189: sFac.createPointStyle(null, symb, range);
190:
191: }
192:
193: public void testCreateIncompletePointStyle() {
194: SLDStyleFactory sFac = new SLDStyleFactory();
195: NumberRange range = new NumberRange(1, 1);
196: StyleFactory fac = StyleFactoryFinder.createStyleFactory();
197:
198: PointSymbolizer symb;
199: Mark myMark;
200: //full symbolizer
201: symb = StyleFactoryFinder.createStyleFactory()
202: .createPointSymbolizer();
203: myMark = fac.createMark();
204:
205: symb.getGraphic().addMark(myMark);
206:
207: sFac.createPointStyle(null, symb, range);
208:
209: }
210:
211: /**
212: * Test of createTextStyle method, of class org.geotools.renderer.style.SLDStyleFactory.
213: */
214: public void testCreateTextStyle() {
215:
216: // TODO add your test code below by replacing the default call to fail.
217: }
218:
219: /**
220: * Test of setScaleRange method, of class org.geotools.renderer.style.SLDStyleFactory.
221: */
222: public void testSetScaleRange() {
223:
224: // TODO add your test code below by replacing the default call to fail.
225: }
226:
227: /**
228: * Test of getPaint method, of class org.geotools.renderer.style.SLDStyleFactory.
229: */
230: public void testGetPaint() {
231:
232: // TODO add your test code below by replacing the default call to fail.
233: }
234:
235: /**
236: * Test of getComposite method, of class org.geotools.renderer.style.SLDStyleFactory.
237: */
238: public void testGetComposite() {
239:
240: // TODO add your test code below by replacing the default call to fail.
241: }
242:
243: /**
244: * Test of getTexturePaint method, of class org.geotools.renderer.style.SLDStyleFactory.
245: */
246: public void testGetTexturePaint() {
247:
248: // TODO add your test code below by replacing the default call to fail.
249: }
250:
251: /**
252: * Test of lookUpJoin method, of class org.geotools.renderer.style.SLDStyleFactory.
253: */
254: public void testLookUpJoin() {
255:
256: // TODO add your test code below by replacing the default call to fail.
257: }
258:
259: /**
260: * Test of lookUpCap method, of class org.geotools.renderer.style.SLDStyleFactory.
261: */
262: public void testLookUpCap() {
263:
264: // TODO add your test code below by replacing the default call to fail.
265: }
266:
267: /**
268: * Test of getMapScaleDenominator method, of class org.geotools.renderer.style.SLDStyleFactory.
269: */
270: public void testGetMapScaleDenominator() {
271:
272: // TODO add your test code below by replacing the default call to fail.
273: }
274:
275: /**
276: * Test of setMapScaleDenominator method, of class org.geotools.renderer.style.SLDStyleFactory.
277: */
278: public void testSetMapScaleDenominator() {
279:
280: // TODO add your test code below by replacing the default call to fail.
281: }
282:
283: }
|