/*
 * Copyright 2013-2015 must-be.org
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package nuget.entry;

import java.io.IOException;

import javax.annotation.Nonnull;

import org.junit.Assert;
import org.junit.Test;
import com.intellij.util.io.HttpRequests;
import consulo.nuget.module.extension.NuGetRequestQueue;

/**
 * @author VISTALL
 * @since 15.10.2015
 */
public class NuGetRequestQueueTests extends Assert
{
	private final NuGetRequestQueue testObj = new NuGetRequestQueue();

	@Test
	public void testNuGetOrg()
	{
		testRequest("https://nuget.org/api/v2/FindPackagesById()?id=%27NLog%27&includePrerelease=true");
	}

	@Test
	public void testDargonIo()
	{
		testRequest("https://nuget.dargon.io/FindPackagesById()?id=%27NLog%27&includePrerelease=true");
	}

	private void testRequest(String url) {
		final String kExpectedResult = "expected_result";
		String result = testObj.request(url, new HttpRequests.RequestProcessor<String>() {
			@Override
			public String process(@Nonnull HttpRequests.Request request) throws IOException
			{
				System.out.println("Request Successful:" + request.isSuccessful());
				return kExpectedResult;
			}
		});
		System.out.println("Expected result: '" + kExpectedResult + "' and got: '" + result + "' for url " +     url);
		assertEquals(kExpectedResult, result);
	}
}
@@ -623,63 +623,99 @@
 ort 
-java.io.IOException;%0A%0Aimport javax.annotation.Nonnull;%0A
+com.intellij.util.io.HttpRequests;%0Aimport consulo.nuget.module.extension.NuGetRequestQueue;
 %0Aimp
@@ -763,105 +763,68 @@
 st;%0A
+%0A
 import 
-com.intellij.util.io.HttpRequests;%0Aimport consulo.nuget.module.extension.NuGetRequestQueue
+javax.annotation.Nonnull;%0Aimport java.io.IOException
 ;%0A%0A/
@@ -877,16 +877,25 @@
 %0Apublic 
+abstract 
 class Nu

disable tests