package gp.e3.autheo.authorization.infrastructure.validators;

import static org.junit.Assert.*;

import org.junit.Test;

public class HttpVerbValidatorTest {
	
	@Test
	public void testIsValidHttpVerb_OK() {
		
		String httpVerb = "Options";
		assertTrue(HttpVerbValidator.isValidHttpVerb(httpVerb));
		
		httpVerb = "GeT";
		assertTrue(HttpVerbValidator.isValidHttpVerb(httpVerb));
		
		httpVerb = "post";
		assertTrue(HttpVerbValidator.isValidHttpVerb(httpVerb));
		
		httpVerb = "PUT";
		assertTrue(HttpVerbValidator.isValidHttpVerb(httpVerb));
		
		httpVerb = "DeLeTe";
		assertTrue(HttpVerbValidator.isValidHttpVerb(httpVerb));
	}
	
	@Test
	public void testIsValidHttpVerb_NOK() {
		
		String httpVerb = "";
		assertFalse(HttpVerbValidator.isValidHttpVerb(httpVerb));
		
		httpVerb = "Options1";
		assertFalse(HttpVerbValidator.isValidHttpVerb(httpVerb));
		
		httpVerb = "eT";
		assertFalse(HttpVerbValidator.isValidHttpVerb(httpVerb));
		
		httpVerb = "post2";
		assertFalse(HttpVerbValidator.isValidHttpVerb(httpVerb));
		
		httpVerb = "HEAD";
		assertFalse(HttpVerbValidator.isValidHttpVerb(httpVerb));
		
		httpVerb = "DeL";
		assertFalse(HttpVerbValidator.isValidHttpVerb(httpVerb));
	}
}
@@ -626,16 +626,183 @@
 Verb));%0A
+%09%09%0A%09%09httpVerb = %22HEAD%22;%0A%09%09assertTrue(HttpVerbValidator.isValidHttpVerb(httpVerb));%0A%09%09%0A%09%09httpVerb = %22PATCH%22;%0A%09%09assertTrue(HttpVerbValidator.isValidHttpVerb(httpVerb));%0A
 %09%7D%0A%09%0A%09@T
@@ -1195,92 +1195,8 @@
 %0A%09%09%0A
-%09%09httpVerb = %22HEAD%22;%0A%09%09assertFalse(HttpVerbValidator.isValidHttpVerb(httpVerb));%0A%09%09%0A
 %09%09ht

Fix test of HttpVerbValidator. PATCH and HEAD are valid http verbs