fix some nunit tests

httptests
UbitUmarov 2017-08-28 10:48:46 +01:00
parent b3eec90d3c
commit 47648557c1
2 changed files with 9 additions and 4 deletions

View File

@ -267,6 +267,7 @@ namespace OpenSim.Capabilities.Handlers.FetchInventory.Tests
[Test]
public void Test_005_FolderZero()
{
TestHelpers.InMethod();
Init();
@ -283,11 +284,11 @@ namespace OpenSim.Capabilities.Handlers.FetchInventory.Tests
Assert.That(llsdresponse != null, Is.True, "Incorrect null response");
Assert.That(llsdresponse != string.Empty, Is.True, "Incorrect empty response");
Assert.That(llsdresponse.Contains("bad_folders</key><array><uuid>00000000-0000-0000-0000-000000000000"), Is.True, "Folder Zero should be a bad folder");
// we do return a answer now
//Assert.That(llsdresponse.Contains("bad_folders</key><array><uuid>00000000-0000-0000-0000-000000000000"), Is.True, "Folder Zero should be a bad folder");
Console.WriteLine(llsdresponse);
}
}
}

View File

@ -29,6 +29,7 @@ using System;
using System.Collections;
using System.Collections.Generic;
using System.Net;
using System.Text;
using log4net.Config;
using Nini.Config;
using NUnit.Framework;
@ -125,7 +126,7 @@ namespace OpenSim.Region.ClientStack.Linden.Tests
Hashtable eventsResponse = m_eqgMod.GetEvents(UUID.Zero, sp.UUID);
// initial queue as null events
eventsResponse = m_eqgMod.GetEvents(UUID.Zero, sp.UUID);
// eventsResponse = m_eqgMod.GetEvents(UUID.Zero, sp.UUID);
if((int)eventsResponse["int_response_code"] != (int)HttpStatusCode.OK)
{
eventsResponse = m_eqgMod.GetEvents(UUID.Zero, sp.UUID);
@ -136,8 +137,11 @@ namespace OpenSim.Region.ClientStack.Linden.Tests
Assert.That((int)eventsResponse["int_response_code"], Is.EqualTo((int)HttpStatusCode.OK));
// Console.WriteLine("Response [{0}]", (string)eventsResponse["str_response_string"]);
string data = String.Empty;
if(eventsResponse["bin_response_data"] != null)
data = Encoding.UTF8.GetString((byte[])eventsResponse["bin_response_data"]);
OSDMap rawOsd = (OSDMap)OSDParser.DeserializeLLSDXml((string)eventsResponse["str_response_string"]);
OSDMap rawOsd = (OSDMap)OSDParser.DeserializeLLSDXml(data);
OSDArray eventsOsd = (OSDArray)rawOsd["events"];
bool foundUpdate = false;