Project

General

Profile

« Previous | Next » 

Revision 2451

Added by sgarg over 19 years ago

Removed unwanted code.

View differences:

test/edu/ucsb/nceas/metacattest/NonAsciiCharacterTest.java
195 195
        TestSuite suite = new TestSuite();
196 196
        suite.addTest(new NonAsciiCharacterTest("initialize"));
197 197
        // Test basic functions
198
        suite.addTest(new NonAsciiCharacterTest("nonAsciiTest_1"));
199
        suite.addTest(new NonAsciiCharacterTest("nonAsciiTest_2"));
200
        suite.addTest(new NonAsciiCharacterTest("nonAsciiTest_3"));
201
        suite.addTest(new NonAsciiCharacterTest("nonAsciiTest_4"));
202
        suite.addTest(new NonAsciiCharacterTest("nonAsciiTest_5"));
198
        suite.addTest(new NonAsciiCharacterTest("invalidXMLCharactersTest"));
199
        suite.addTest(new NonAsciiCharacterTest("symbolEncodedFormatTest"));
200
        suite.addTest(new NonAsciiCharacterTest("quoteTest"));
201
        suite.addTest(new NonAsciiCharacterTest("numericCharacterReferenceFormatTest"));
202
        suite.addTest(new NonAsciiCharacterTest("nonLatinUnicodeCharacterTest"));
203 203

  
204 204
        return suite;
205 205
    }
......
217 217
     * Test inserting document with > & <
218 218
     * should fail because this means an invalid xml document is being inserted
219 219
     */
220
    public void nonAsciiTest_1() {
220
    public void invalidXMLCharactersTest() {
221 221
        try {
222 222
            newdocid = generateDocid();
223 223
            m.login(username, password);
......
238 238

  
239 239

  
240 240
    /** *********
241
     * Test inserting document with &gt; $amp; &lt;
241
     * Test inserting document with &gt; &amp; &lt;
242 242
     * should fail because this means an invalid xml document is being inserted
243 243
     */
244
    public void nonAsciiTest_2() {
244
    public void symbolEncodedFormatTest() {
245 245
        try {
246 246
            newdocid = generateDocid();
247 247
            m.login(username, password);
......
266 266
     * Test inserting document with single quote and double quote
267 267
     * should fail because this means an invalid xml document is being inserted
268 268
     */
269
    public void nonAsciiTest_3() {
269
    public void quoteTest() {
270 270
        try {
271 271
            newdocid = generateDocid();
272 272
            m.login(username, password);
......
292 292
     * Test inserting document with micro sign
293 293
     * should fail because this means an invalid xml document is being inserted
294 294
     */
295
    public void nonAsciiTest_4() {
295
    public void numericCharacterReferenceFormatTest() {
296 296
        try {
297 297
            newdocid = generateDocid();
298 298
            m.login(username, password);
......
317 317
     * Test inserting document with characters like µ
318 318
     * should fail because this means an invalid xml document is being inserted
319 319
     */
320
    public void nonAsciiTest_5() {
320
    public void nonLatinUnicodeCharacterTest() {
321 321
        try {
322
            int i = 0x03bc;
323 322
            newdocid = generateDocid();
324 323
            m.login(username, password);
325 324
            testdocument = getTestEmlDoc("Checking charcters like µ");
326 325
            insertDocid(newdocid + ".1", testdocument, SUCCESS, false);
326
            testdocument = getTestEmlDoc("Checking charcters like &#194;&#181;");
327 327
            readDocidWhichEqualsDoc(newdocid, testdocument, SUCCESS, true);
328 328
            m.logout();
329 329
        }

Also available in: Unified diff