001    /*
002     * (c) Copyright 2010 University of Bristol
003     * All rights reserved.
004     * [See end of file]
005     */
006    
007    package net.rootdev.javardfa;
008    
009    import net.rootdev.javardfa.uri.URIResolver;
010    import org.junit.Test;
011    import static org.junit.Assert.*;
012    
013    /**
014     *
015     * @author pldms
016     */
017    public class MiscTests {
018    
019        @Test
020        public void CheckURIResolver() {
021            Resolver resolver = new URIResolver();
022            String url = "javascript:working_ajax('div_trailers_row_ID_0', '/trailers_pictures/photo_strip_ajax.php?media_type=trailers&skin=mob&type=2&id=1144763');";
023            try {
024                String resolved = resolver.resolve("http://example.com/", url);
025                assertNull(resolved);
026            } catch (Exception e) {
027                e.printStackTrace();
028                fail("resolver threw exception: " + e.getMessage());
029            }
030        }
031    
032    }
033    
034    
035    /*
036     * (c) Copyright 2010 University of Bristol
037     * All rights reserved.
038     *
039     * Redistribution and use in source and binary forms, with or without
040     * modification, are permitted provided that the following conditions
041     * are met:
042     * 1. Redistributions of source code must retain the above copyright
043     *    notice, this list of conditions and the following disclaimer.
044     * 2. Redistributions in binary form must reproduce the above copyright
045     *    notice, this list of conditions and the following disclaimer in the
046     *    documentation and/or other materials provided with the distribution.
047     * 3. The name of the author may not be used to endorse or promote products
048     *    derived from this software without specific prior written permission.
049     *
050     * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
051     * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
052     * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
053     * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
054     * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
055     * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
056     * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
057     * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
058     * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
059     * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
060     */