Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a fix for recognizing eBay's new item URL, and _gasp_ a test for …
…the fix!
- Loading branch information
Showing
2 changed files
with
44 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
test/com/jbidwatcher/auction/server/ebay/ebayServerTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package com.jbidwatcher.auction.server.ebay; | ||
|
||
import com.jbidwatcher.auction.server.AuctionServer; | ||
import junit.framework.TestCase; | ||
|
||
/** | ||
* Created by IntelliJ IDEA. | ||
* User: mrs | ||
* Date: Apr 26, 2010 | ||
* Time: 12:54:48 AM | ||
* To change this template use File | Settings | File Templates. | ||
*/ | ||
public class ebayServerTest extends TestCase { | ||
public void testExtractIdentifierFromURLString() throws Exception { | ||
AuctionServer ebay = new ebayServer(); | ||
String id = ebay.extractIdentifierFromURLString("http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item=220594110651"); | ||
assertEquals("220594110651", id); | ||
id = ebay.extractIdentifierFromURLString("http://cgi.ebay.com/Panasonic-Lumix-20mm-/220594110651?cmd=ViewItem&pt=Camera_Lenses&hash=item335c6f00bb"); | ||
assertEquals("220594110651", id); | ||
id = ebay.extractIdentifierFromURLString("http://cgi.ebay.com/220594110651"); | ||
assertEquals("220594110651", id); | ||
} | ||
|
||
public void testGetStringURLFromItem() throws Exception { | ||
} | ||
|
||
public void testGetBrowsableURLFromItem() throws Exception { | ||
} | ||
|
||
public void testIsDefaultUser() throws Exception { | ||
} | ||
|
||
public void testGetUserId() throws Exception { | ||
} | ||
} |