Project

General

Profile

« Previous | Next » 

Revision 5887

Added by berkley about 13 years ago

adding fields for additional system metadata info

View differences:

IdentifierManagerTest.java
62 62
     */
63 63
    public void testGetGUID()
64 64
    {
65
        ph("testGetGUID");
65 66
        try
66 67
        {
67 68
            IdentifierManager im = IdentifierManager.getInstance();
......
86 87
     */
87 88
    public void testGetAllLocalIds()
88 89
    {
90
        ph("testGetAllLocalIds");
89 91
        try
90 92
        {
91 93
            List l = IdentifierManager.getInstance().getAllLocalIds();
92 94
            for(int i=0; i<l.size(); i++)
93 95
            {
94
                //System.out.println(l.get(i));
96
                System.out.println(l.get(i));
95 97
            }
96 98
            assertTrue(l.size() > 0);
97 99
        }
......
103 105

  
104 106
    /** Test that IM instances can be created. */
105 107
    public void testGetInstance() {
108
        ph("testGetInstance");
106 109
        IdentifierManager im = IdentifierManager.getInstance();
107 110
        assertNotNull(im);
108 111
    }
109 112

  
110 113
    /** Test that known LocalId's can be looked up from GUIDs. */
111 114
    public void testGetLocalId() {
115
        ph("testGetLocalId");
112 116
        IdentifierManager im = IdentifierManager.getInstance();
113 117
        String docid = insertTestDocument();
114 118
        String goodGuid = "test:" + docid;
......
124 128
    
125 129
    /** Test that unknown LocalId's return the proper exception. */
126 130
    public void testGetLocalIdNotFound() {
131
        ph("testGetLocalIdNotFound");
127 132
        IdentifierManager im = IdentifierManager.getInstance();
128 133
        String idReturned;
129 134
        try {
......
140 145
     *  be, and that it is not present when it shouldn't be. 
141 146
     */
142 147
    public void testIdentifierExists() {
148
        ph("testIdentifierExists");
143 149
        IdentifierManager im = IdentifierManager.getInstance();
144 150
        String docid = insertTestDocument();
145 151
        im.createMapping("test:"+docid, docid);
......
154 160
     * getLocalId() and getGUID()
155 161
     */
156 162
    public void testCreateMapping() {
163
       ph("testCreateMapping");
157 164
       try
158 165
       {
159 166
            IdentifierManager im = IdentifierManager.getInstance();
......
177 184
     */
178 185
    public void testCreateSystemMetadataMapping()
179 186
    {
187
        ph("testCreateSystemMetadataMapping");
180 188
        try
181 189
        {
182 190
            IdentifierManager im = IdentifierManager.getInstance();
......
211 219
                null, "http://fake.example.com/somedata", null,
212 220
                accessBlock, null, null,
213 221
                null, null);
222
        System.out.println("inserting doc: " + emldoc);
214 223
        String docid = generateDocumentId() + ".1";
215 224
        try {
216 225
            m.login(username, password);
......
222 231
        }
223 232
        return docid;
224 233
    }
234
    
235
    private void ph(String s)
236
    {
237
        System.out.println("*********************** " + s + " ****************************");
238
    }
225 239
}

Also available in: Unified diff