protected internal void Complete()
{
foreach(DictionaryEntry entry in headers)
{
String name = entry.Key.ToString();
if ("Set-Cookie".Equals(name))
{
if (entry.Value is IList)
{
foreach(String value in (IList) entry.Value)
{
cookies.SetCookies(new Uri("http://localhost"), value);
}
}
else
{
try
{
cookies.SetCookies(new Uri("http://localhost"), entry.Value.ToString());
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
}
break;
}
}
HttpContext context = TestContextHolder.Context;
flash = (IDictionary) context.Items["mr.flash"];
session = (IDictionary) context.Items["mr.session"];
propertyBag = (IDictionary) context.Items["mr.propertybag"];
}
}