using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
using System.Xml.Linq;
using System.Reflection;

namespace NuGet.Protocol.Core.v3.Tests
{
    public static class TestUtility
    {
        public static string GetResource(string name, Type type)
        {
            using (var reader = new StreamReader(type.GetTypeInfo().Assembly.GetManifestResourceStream(name)))
            {
                return reader.ReadToEnd();
            }
        }

        public static string CreateServiceAddress()
        {
            return string.Format("http://{0}/", Guid.NewGuid());
        }
    }
}
