package marketing.heyday.hartmann.fotodocumentation.rest;

import static org.junit.jupiter.api.Assertions.assertNotNull;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.junit.jupiter.api.MethodOrderer.OrderAnnotation;
import org.junit.jupiter.api.Order;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.TestMethodOrder;

/**
 * 
 * <p>Copyright: Copyright (c) 2024</p>
 * <p>Company: heyday Marketing GmbH</p>
 * @author <a href="mailto:p.verboom@heyday.marketing">Patrick Verboom</a>
 * @version 1.0
 * 
 * created: 21 Jan 2026
 */

@TestMethodOrder(OrderAnnotation.class)
public class LoginResourceTest extends AbstractRestTest {
	private static final Log LOG = LogFactory.getLog(LoginResourceTest.class);

	@Test
	@Order(2)
	public void doTestLogin() {
		LOG.info("doTestLogin");
		String token = getBasicHeader();
		assertNotNull(token);
	}

	public static void main(String[] args) {
		var test = new LoginResourceTest();
		test.deploymentURL = "http://localhost:8080/";
		String token = test.getAuthorization("hartmann", "nvlev4YnTi");
		System.out.println(token);
	}
}
