package test;

import com.tickets.business.services.MovieService;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;

import com.tickets.business.entities.User;
import com.tickets.business.services.UserService;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;


public class ApplicationTest extends BaseTest {

    @Autowired
    private UserService userService;

    @Test
    public void testUser()  {
        String username = "Alice", password = "123456";
        assertFalse(userService.hasUsername(username));
        userService.create(new User(username, password));
        assertTrue(userService.hasUsername(username));
        assertTrue(userService.permitLogin(username, password));
        assertFalse(userService.permitLogin(username, "XXX"));
    }
<<<<<<< HEAD


    @Test
    public void testMovie() {
        // TODO testMovie()
    }
=======
>>>>>>> upstream/dev
}

@@ -879,124 +879,6 @@
   %7D%0A
-%3C%3C%3C%3C%3C%3C%3C HEAD%0A%0A%0A    @Test%0A    public void testMovie() %7B%0A        // TODO testMovie()%0A    %7D%0A=======%0A%3E%3E%3E%3E%3E%3E%3E upstream/dev%0A
 %7D%0A

change to manyToMany and merge again