001/**
002 * Copyright 2015 DuraSpace, Inc.
003 *
004 * Licensed under the Apache License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 *     http://www.apache.org/licenses/LICENSE-2.0
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016package org.fcrepo.client;
017
018import static org.junit.Assert.assertEquals;
019
020import org.apache.http.client.methods.HttpDelete;
021import org.apache.http.client.methods.HttpGet;
022import org.apache.http.client.methods.HttpHead;
023import org.apache.http.client.methods.HttpOptions;
024import org.apache.http.client.methods.HttpPatch;
025import org.apache.http.client.methods.HttpPost;
026import org.apache.http.client.methods.HttpPut;
027
028import org.junit.Test;
029import org.junit.runner.RunWith;
030import org.junit.runners.JUnit4;
031
032/**
033 * @author Aaron Coburn
034 */
035@RunWith(JUnit4.class)
036public class HttpMethodsTest {
037
038    @Test
039    public void testMethods() {
040        assertEquals(HttpMethods.DELETE.toString(), HttpDelete.METHOD_NAME);
041        assertEquals(HttpMethods.GET.toString(), HttpGet.METHOD_NAME);
042        assertEquals(HttpMethods.HEAD.toString(), HttpHead.METHOD_NAME);
043        assertEquals(HttpMethods.OPTIONS.toString(), HttpOptions.METHOD_NAME);
044        assertEquals(HttpMethods.PATCH.toString(), HttpPatch.METHOD_NAME);
045        assertEquals(HttpMethods.POST.toString(), HttpPost.METHOD_NAME);
046        assertEquals(HttpMethods.PUT.toString(), HttpPut.METHOD_NAME);
047    }
048}