package app.tests;

/**
 * Created by Samuel on 23-01-17.
 */

import app.login.RegisterController;
import app.login.User;
import org.junit.Assert;
import org.junit.FixMethodOrder;
import org.junit.Test;
import org.junit.runners.MethodSorters;
@FixMethodOrder(MethodSorters.JVM)
public class LoginTest {

   @Test
   public void nameTester() {
       RegisterController tester = new RegisterController();
       Boolean name=true;
       String name2="Toos";
       String name3="Pieter";
       // assert statements
      Boolean result2 = RegisterController.multiplyString(name);
       Assert.assertEquals(name, result2);
//        String result3 = tester.multiplyString(name2);
//        assertEquals(name2, result3);
//        String result4 = tester.multiplyString(name3);
//        assertEquals(name3, result4);
//        String result = tester.multiplyString("name");
//        assertEquals("name", result);
      Boolean result0 = RegisterController.multiplyString(true);
      Assert.assertEquals(true, result0);
   }

   @Test
   public void createAdressTester() {
       User tester = new User();
       String name="2";
       String name2="Toos";
       String name3="Pieter";
       String name4="city";
       // assert statements
//        String result = tester.createAdress(name, name2, name3, name, name3);
//        assertEquals("insert into adress(usernamecustomer, city, postalcode ,street, housenumber) values('"+name+"', '"+name2+"', '"+name3+"', '"+name+"', '"+name3+"');", result);
//        String result1 = tester.alterAdress(name4, name2, name3);
//        assertEquals("city", result1);
//        String result2 = tester.deleteAdress(name);
//        assertEquals(name, result2);
   }

   @Test
   public void createCustomerTester() {
       User tester = new User();
       String name="02-12-2016";
       String name2="Toos";
       String name3="Pieter";
       String name4="userlevel";
       // assert statements
//        Boolean result = tester.createCustomer(name3, name2, name3, name2, name3,name,name3,name);
//        assertEquals(true, result);
//        String result1 = tester.alterCustomer(name4, name2, name3);
//        assertEquals("userlevel", result1);
//        String result2 = tester.deleteCustomer(name3);
//        assertEquals(name3, result2);
 }

   @Test
   public void wishlistTester() {
       User tester = new User();
       String name="02-12-2016";
       String name2="Toos";
       String name3="2";
       // assert statements
//        String result = tester.addWishproduct(name3, name2, name3);
//        assertEquals("insert into wishlistproducts(productid, wishlistid, quantity) values('"+name3+"', '"+name2+"', '"+name3+"');", result);
   }
}

@@ -60,45 +60,8 @@
 */%0A%0A
-import app.login.RegisterController;%0A
 impo
@@ -200,16 +200,77 @@
 orters;%0A
+%0Aimport static app.login.RegisterController.multiplyString;%0A%0A
 @FixMeth
@@ -321,30 +321,32 @@
 nTest %7B%0A%0A   
+ 
 @Test%0A
+ 
    public vo
@@ -359,24 +359,27 @@
 eTester() %7B%0A
+// 
        Regis
@@ -430,24 +430,25 @@
 r();%0A       
+ 
 Boolean name
@@ -454,16 +454,17 @@
 e=true;%0A
+ 
        S
@@ -475,32 +475,33 @@
 g name2=%22Toos%22;%0A
+ 
        String na
@@ -513,32 +513,33 @@
 Pieter%22;%0A       
+ 
 // assert statem
@@ -545,24 +545,25 @@
 ments%0A      
+ 
 Boolean resu
@@ -568,35 +568,16 @@
 sult2 = 
-RegisterController.
 multiply
@@ -586,24 +586,25 @@
 ring(name);%0A
+ 
        Asser
@@ -927,24 +927,25 @@
 ult);%0A      
+ 
 Boolean resu
@@ -950,35 +950,16 @@
 sult0 = 
-RegisterController.
 multiply
@@ -968,24 +968,25 @@
 ring(true);%0A
+ 
       Assert
@@ -1015,16 +1015,17 @@
 sult0);%0A
+ 
    %7D%0A%0A  

Update LoginTest.java