Examples of MockData


Examples of edu.wpi.cs.wpisuitetng.modules.defecttracker.MockData

    goodUpdatedDefect.setAssignee(existingUserCopy);
    goodUpdatedDefect.setEvents(new ArrayList<DefectEvent>());
    goodUpdatedDefect.getTags().add(tagCopy);
    goodUpdatedDefect.setStatus(DefectStatus.CONFIRMED);
   
    db = new MockData(new HashSet<Object>());
    db.save(tag, testProject);
    db.save(bob);
    db.save(existingDefect, testProject);
    db.save(existingUser);
    db.save(otherDefect, otherProject);
View Full Code Here

Examples of edu.wpi.cs.wpisuitetng.modules.defecttracker.MockData

    defect = new Defect(1, "title", "description", bob);
   
    User bobCopy = new User(null, "bob", null, -1);
    goodNewComment = new Comment(1, bobCopy, "hello");
   
    db = new MockData(new HashSet<Object>());
    db.save(defect, testProject);
    db.save(bob);
    validator = new CommentValidator(db);
  }
View Full Code Here

Examples of edu.wpi.cs.wpisuitetng.modules.defecttracker.MockData

    testProject = new Project("test", "1");
    defaultSession = new Session(bob, testProject, mockSsid);
    defect = new Defect(1, "title", "description", bob);
    goodComment = new Comment(1, bob, "this defect is stupid, and so are you");
   
    db = new MockData(new HashSet<Object>());
    db.save(defect, testProject);
    db.save(bob);
    manager = new CommentManager(db);
  }
View Full Code Here

Examples of edu.wpi.cs.wpisuitetng.modules.defecttracker.MockData

    goodUpdatedDefect.setStatus(DefectStatus.CONFIRMED);
   
    defaultSession = new Session(existingUser, testProject, mockSsid);
    newDefect = new Defect(-1, "A new defect", "A description", existingUser);
   
    db = new MockData(new HashSet<Object>());
    db.save(existingDefect, testProject);
    db.save(existingUser);
    db.save(otherDefect, otherProject);
    db.save(admin);
    manager = new DefectManager(db);
View Full Code Here

Examples of org.geoserver.data.test.MockData

public class TolerantStartupTest extends GeoServerTestSupport {
   
    @Override
    public MockData buildTestData() throws Exception {
        MockData md = new MockData();
       
        QName name = MockData.BASIC_POLYGONS;
        URL properties = MockData.class.getResource(name.getLocalPart() + ".properties");
        String styleName = name.getLocalPart();
        Map<String, Object> props = new HashMap<String, Object>();
        props.put(MockData.KEY_STYLE, styleName);
        props.put(MockData.KEY_SRS_HANDLINGS, ProjectionPolicy.REPROJECT_TO_DECLARED.getCode());
        props.put(MockData.KEY_SRS_NUMBER, "123456");
        md.addPropertiesType(name, properties, props);
       
        md.addWellKnownTypes(new QName[] {MockData.BUILDINGS});
       
        return md;
    }
View Full Code Here

Examples of org.geoserver.data.test.MockData

    private static final QName typeName = MockData.BASIC_POLYGONS;

    @Override
    protected TestData buildTestData() throws Exception {
        // create the data directory
        MockData dataDirectory = new MockData();
        dataDirectory.addWellKnownTypes(new QName[]{typeName});
        return dataDirectory;
    }
View Full Code Here

Examples of org.geoserver.data.test.MockData

        dataDirectory.addWellKnownTypes(new QName[]{typeName});
        return dataDirectory;
    }

    public void testMissingFeatureTypes() throws Exception {
        MockData mockData = (MockData)getTestData();
       
        mockData.getFeatureTypesDirectory().delete();
        LegacyCatalogImporter importer = new LegacyCatalogImporter(new CatalogImpl());
        importer.imprt(mockData.getDataDirectoryRoot());
    }
View Full Code Here

Examples of org.geoserver.data.test.MockData

        LegacyCatalogImporter importer = new LegacyCatalogImporter(new CatalogImpl());
        importer.imprt(mockData.getDataDirectoryRoot());
    }
   
    public void testMissingCoverages() throws Exception {
        MockData mockData = (MockData)getTestData();
       
        mockData.getCoveragesDirectory().delete();
        LegacyCatalogImporter importer = new LegacyCatalogImporter(new CatalogImpl());
        importer.imprt(mockData.getDataDirectoryRoot());
    }
View Full Code Here

Examples of org.geoserver.data.test.MockData

    /**
     * As per GEOS-3513, make sure the old SRS codes are imported by adding the EPSG: prefix where
     * needed
     */
    public void testCRSPrefix() throws Exception {
        MockData mockData = (MockData)getTestData();
       
        mockData.getCoveragesDirectory().delete();
        Catalog catalog = new CatalogImpl();
        LegacyCatalogImporter importer = new LegacyCatalogImporter(catalog);
       
        File dataDirectoryRoot = mockData.getDataDirectoryRoot();
        importer.imprt(dataDirectoryRoot);
       
        FeatureTypeInfo typeInfo = catalog.getFeatureTypeByName(typeName.getNamespaceURI(), typeName.getLocalPart());
        assertEquals("EPSG:4326", typeInfo.getSRS());
    }
View Full Code Here

Examples of org.geoserver.data.test.MockData

   
  
    @Override
    public MockData buildTestData() throws Exception {
        // create the data directory
        MockData dataDirectory = new MockData();
        populateDataDirectory(dataDirectory);
        return dataDirectory;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.