package URLShortener.Test;

import URLShortener.Utility.ShortURLData;
import URLShortener.Utility.URLShortener;
import org.junit.Test;

import static org.junit.Assert.*;

/**
 * Created by Vincenzo_Pc on 20/08/2015.
 */
public class ShortURLDataTest {


    String cases = "broJG";
    String cases1 = "www.google.it";
    ShortURLData test = new ShortURLData(cases,cases1);
    @Test
    public void testSetJsonString() throws Exception {


    }

    @Test
    public void testAddNewClick() throws Exception {

    }

    @Test
    public void testSaveShortLongURL() throws Exception {
        boolean result = test.saveShortLongURL(cases, cases1);
        assertTrue(result==false);
    }


}

@@ -242,24 +242,49 @@
 DataTest %7B%0A%0A
+    int i=0;%0A    int j=0;
 %0A    String 
@@ -278,24 +278,26 @@
 ;%0A    String
+%5B%5D
  cases = %22br
@@ -297,15 +297,73 @@
 s = 
+%7B
 %22broJG%22
+,%22SQhAJ%22,%22GHoHp%22,%22q8xTB%22,%22vlynY%22,%22IRosu%22,%22NuUr8%22,%22cxmDH%22%7D
 ;%0A  
@@ -370,16 +370,18 @@
   String
+%5B%5D
  cases1 
@@ -382,16 +382,17 @@
 ases1 = 
+%7B
 %22www.goo
@@ -398,17 +398,176 @@
 ogle.it%22
-;
+,%22www.amazon.com%22,%22www.basididatiavanzati.de%22,%22https://www.focus.it%22,%22www.ciaosic.sl%22,%22www.happycasa.org%22,%22www.ultimoesameesto.ciao%22,%22www.tempesta.civediamo%22%7D;%0A
 %0A    Sho
@@ -609,15 +609,21 @@
 ases
+%5Bi%5D
 ,cases1
+%5Bj%5D
 );%0A 
@@ -834,16 +834,104 @@
 ption %7B%0A
+        for(i=0;i%3Ccases.length;i++)%7B%0A            for(j=0;j%3Ccases1.length;j++)%7B%0A%0A        
         
@@ -978,16 +978,19 @@
 ases
+%5Bi%5D
 , cases1
 );%0A 
@@ -985,19 +985,30 @@
 , cases1
-);%0A
+%5Bj%5D);%0A        
         
@@ -1034,16 +1034,41 @@
 false);%0A
+            %7D%0A        %7D%0A%0A
     %7D%0A%0A%0A

Test Update