package URLShortener.Test;

import URLShortener.Utility.JsonValues;
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 {

    int i=0;
    int j=0;
    String[] casoPrimo = {"broJG","SQhAJ","GHoHp","q8xTB","vlynY","IRosu","NuUr8","cxmDH"};
    String[] casoSecondo = {"www.google.it","www.amazon.com","www.basididatiavanzati.de","https://www.focus.it","www.ciaosic.sl","www.happycasa.org","www.ultimoesameesto.ciao","www.tempesta.civediamo"};

    ShortURLData test = new ShortURLData(casoPrimo[i],casoSecondo[j]);

    @Test
    public void testSetJsonString() throws Exception {
        JsonValues result = test.setJsonString();
        assertTrue(result != null);

    }

    @Test
    public void testAddNewClick() throws Exception {

    }

    @Test
    public void testSaveShortLongURL() throws Exception {
        for(i=0;i<casoPrimo.length;i++){
            for(j=0;j<casoSecondo.length;j++){

                boolean result = test.saveShortLongURL(casoPrimo[i], casoSecondo[j]);
                assertTrue(result==false);
            }
        }

    }


}

@@ -766,24 +766,25 @@
 alues result
+1
  = test.setJ
@@ -821,16 +821,17 @@
 e(result
+1
  != null
@@ -845,79 +845,8 @@
  %7D%0A%0A
-    @Test%0A    public void testAddNewClick() throws Exception %7B%0A%0A    %7D%0A%0A
     

update test