Added NightAlert project for travel kit
This commit is contained in:
82
ThirdParty/SocketIoClientDotNet/Src/SocketIoClientDotNet.Tests.net45/ClientTests/Connection.cs
vendored
Normal file
82
ThirdParty/SocketIoClientDotNet/Src/SocketIoClientDotNet.Tests.net45/ClientTests/Connection.cs
vendored
Normal file
@@ -0,0 +1,82 @@
|
||||
using Newtonsoft.Json;
|
||||
using Quobject.EngineIoClientDotNet.Modules;
|
||||
using Quobject.SocketIoClientDotNet.Client;
|
||||
using System.IO;
|
||||
|
||||
namespace SocketIoClientDotNet.Tests.ClientTests
|
||||
{
|
||||
public class Connection
|
||||
{
|
||||
public static readonly int TIMEOUT = 300000;
|
||||
|
||||
static Connection()
|
||||
{
|
||||
LogManager.SetupLogManager();
|
||||
}
|
||||
|
||||
protected IO.Options CreateOptions()
|
||||
{
|
||||
var log = LogManager.GetLogger(Global.CallerName());
|
||||
|
||||
|
||||
var config = ConfigBase.Load();
|
||||
var options = new IO.Options();
|
||||
options.Port = config.server.port;
|
||||
options.Hostname = config.server.hostname;
|
||||
options.ForceNew = true;
|
||||
log.Info("Please add to your hosts file: 127.0.0.1 " + options.Hostname);
|
||||
|
||||
return options;
|
||||
}
|
||||
|
||||
protected string CreateUri()
|
||||
{
|
||||
var options = CreateOptions();
|
||||
var uri = string.Format("{0}://{1}:{2}", options.Secure ? "https" : "http", options.Hostname, options.Port);
|
||||
return uri;
|
||||
}
|
||||
|
||||
|
||||
protected IO.Options CreateOptionsSecure()
|
||||
{
|
||||
var log = LogManager.GetLogger(Global.CallerName());
|
||||
|
||||
var config = ConfigBase.Load();
|
||||
var options = new IO.Options();
|
||||
options.Port = config.server.ssl_port;
|
||||
options.Hostname = config.server.hostname;
|
||||
log.Info("Please add to your hosts file: 127.0.0.1 " + options.Hostname);
|
||||
options.Secure = true;
|
||||
options.IgnoreServerCertificateValidation = true;
|
||||
return options;
|
||||
}
|
||||
}
|
||||
|
||||
public class ConfigBase
|
||||
{
|
||||
public string version { get; set; }
|
||||
public ConfigServer server { get; set; }
|
||||
|
||||
public static ConfigBase Load()
|
||||
{
|
||||
var result = new ConfigBase()
|
||||
{
|
||||
server = new ConfigServer()
|
||||
};
|
||||
result.server.hostname = ConnectionConstants.HOSTNAME;
|
||||
result.server.port = ConnectionConstants.PORT;
|
||||
result.server.ssl_port = ConnectionConstants.SSL_PORT;
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
public class ConfigServer
|
||||
{
|
||||
public string hostname { get; set; }
|
||||
public int port { get; set; }
|
||||
public int ssl_port { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace SocketIoClientDotNet.Tests.ClientTests
|
||||
{
|
||||
public static class ConnectionConstants
|
||||
{
|
||||
public static int PORT = 80;
|
||||
public static string HOSTNAME = "testme.quobject.com";
|
||||
public static int SSL_PORT = 443;
|
||||
public static readonly int TIMEOUT = 300000;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
using Newtonsoft.Json;
|
||||
using Quobject.EngineIoClientDotNet.Modules;
|
||||
using Quobject.SocketIoClientDotNet.Client;
|
||||
using System.IO;
|
||||
|
||||
namespace SocketIoClientDotNet.Tests.ClientTests
|
||||
{
|
||||
public class Connection
|
||||
{
|
||||
public static readonly int TIMEOUT = 300000;
|
||||
|
||||
static Connection()
|
||||
{
|
||||
LogManager.SetupLogManager();
|
||||
}
|
||||
|
||||
protected IO.Options CreateOptions()
|
||||
{
|
||||
//var log = LogManager.GetLogger(Global.CallerName());
|
||||
|
||||
|
||||
var config = ConfigBase.Load();
|
||||
var options = new IO.Options();
|
||||
options.Port = config.server.port;
|
||||
options.Hostname = config.server.hostname;
|
||||
options.ForceNew = true;
|
||||
//log.Info("Please add to your hosts file: 127.0.0.1 " + options.Hostname);
|
||||
|
||||
return options;
|
||||
}
|
||||
|
||||
protected string CreateUri()
|
||||
{
|
||||
var options = CreateOptions();
|
||||
var uri = string.Format("{0}://{1}:{2}", options.Secure ? "https" : "http", options.Hostname, options.Port);
|
||||
return uri;
|
||||
}
|
||||
|
||||
|
||||
protected IO.Options CreateOptionsSecure()
|
||||
{
|
||||
//var log = LogManager.GetLogger(Global.CallerName());
|
||||
|
||||
var config = ConfigBase.Load();
|
||||
var options = new IO.Options();
|
||||
options.Port = config.server.ssl_port;
|
||||
options.Hostname = config.server.hostname;
|
||||
//log.Info("Please add to your hosts file: 127.0.0.1 " + options.Hostname);
|
||||
options.Secure = true;
|
||||
options.IgnoreServerCertificateValidation = true;
|
||||
return options;
|
||||
}
|
||||
}
|
||||
|
||||
public class ConfigBase
|
||||
{
|
||||
public string version { get; set; }
|
||||
public ConfigServer server { get; set; }
|
||||
|
||||
public static ConfigBase Load()
|
||||
{
|
||||
//var configString = File.ReadAllText("./../../../../grunt/config.json");
|
||||
var configString = @"{""version"":""0.1.0.0"",""server"":{""port"":80,""ssl_port"":443,""hostname"":""192.168.178.59""},""win"":{""powershell"":""C:/WINDOWS/System32/WindowsPowerShell/v1.0/powershell.exe"",""msbuild"":""C:/Windows/Microsoft.NET/Framework/v4.0.30319/msbuild.exe"",""xunit_path"":""C:/vendors/xunit"",""nuget"":""C:/vendors/nuget/nuget.exe""},""linux"":{""msbuild"":""xbuild"",""xunit_path"":""/home/apollo/vendors/xunit""}}";
|
||||
|
||||
var config = JsonConvert.DeserializeObject<ConfigBase>(configString);
|
||||
return config;
|
||||
}
|
||||
}
|
||||
|
||||
public class ConfigServer
|
||||
{
|
||||
public string hostname { get; set; }
|
||||
public int port { get; set; }
|
||||
public int ssl_port { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
1327
ThirdParty/SocketIoClientDotNet/Src/SocketIoClientDotNet.Tests.net45/ClientTests/ServerConnectionTest.cs
vendored
Normal file
1327
ThirdParty/SocketIoClientDotNet/Src/SocketIoClientDotNet.Tests.net45/ClientTests/ServerConnectionTest.cs
vendored
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
49
ThirdParty/SocketIoClientDotNet/Src/SocketIoClientDotNet.Tests.net45/ClientTests/UrlTest.cs
vendored
Normal file
49
ThirdParty/SocketIoClientDotNet/Src/SocketIoClientDotNet.Tests.net45/ClientTests/UrlTest.cs
vendored
Normal file
@@ -0,0 +1,49 @@
|
||||
using Quobject.SocketIoClientDotNet.Client;
|
||||
using Xunit;
|
||||
|
||||
namespace SocketIoClientDotNet.Tests.ClientTests
|
||||
{
|
||||
public class UrlTest
|
||||
{
|
||||
[Fact]
|
||||
public void Parse()
|
||||
{
|
||||
const string test = @"http://username:password@host:8080/directory/file?query#ref";
|
||||
var result = Url.Parse(test);
|
||||
var str = result.ToString();
|
||||
Assert.Equal(test,str);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void ParseRelativePath()
|
||||
{
|
||||
const string test = @"https://woot.com/test";
|
||||
var result = Url.Parse(test);
|
||||
Assert.Equal("https",result.Scheme);
|
||||
Assert.Equal("woot.com",result.Host);
|
||||
Assert.Equal("/test",result.LocalPath);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void ParseNoProtocol()
|
||||
{
|
||||
const string test = @"//localhost:3000";
|
||||
var result = Url.Parse(test);
|
||||
Assert.Equal("http", result.Scheme);
|
||||
Assert.Equal("localhost", result.Host);
|
||||
Assert.Equal(3000, result.Port);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void ParseNamespace()
|
||||
{
|
||||
var result = Url.Parse(@"http://woot.com/woot");
|
||||
Assert.Equal("/woot", result.LocalPath);
|
||||
result = Url.Parse(@"http://google.com");
|
||||
Assert.Equal("/", result.LocalPath);
|
||||
result = Url.Parse(@"http://google.com/");
|
||||
Assert.Equal("/", result.LocalPath);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
using Quobject.SocketIoClientDotNet.Modules;
|
||||
using Xunit;
|
||||
|
||||
namespace SocketIoClientDotNet.Tests.ModuleTests
|
||||
{
|
||||
public class HasBinaryDataTest
|
||||
{
|
||||
[Fact]
|
||||
public void ByteArray()
|
||||
{
|
||||
Assert.True(HasBinaryData.HasBinary(new byte[0]));
|
||||
}
|
||||
|
||||
//[Fact]
|
||||
//public void ArrayContainsByteArray()
|
||||
//{
|
||||
// var arr = JArray.Parse(@"[1, null, 2]");
|
||||
// var bytes = System.Text.Encoding.UTF8.GetBytes("asdfasdf");
|
||||
// var token = JToken.FromObject(bytes);
|
||||
// arr.Add(token);
|
||||
// Assert.True(HasBinaryData.HasBinary(arr));
|
||||
//}
|
||||
|
||||
}
|
||||
}
|
||||
142
ThirdParty/SocketIoClientDotNet/Src/SocketIoClientDotNet.Tests.net45/ParserTests/ByteArrayTest.cs
vendored
Normal file
142
ThirdParty/SocketIoClientDotNet/Src/SocketIoClientDotNet.Tests.net45/ParserTests/ByteArrayTest.cs
vendored
Normal file
@@ -0,0 +1,142 @@
|
||||
using Newtonsoft.Json.Linq;
|
||||
using Quobject.SocketIoClientDotNet.Parser;
|
||||
using System.Collections.Generic;
|
||||
using Xunit;
|
||||
|
||||
namespace SocketIoClientDotNet.Tests.ParserTests
|
||||
{
|
||||
public class ByteArrayTest
|
||||
{
|
||||
|
||||
[Fact]
|
||||
public void EncodeByteArray()
|
||||
{
|
||||
var packet = new Packet(Parser.BINARY_EVENT)
|
||||
{
|
||||
Id = 23,
|
||||
Nsp = "/woot",
|
||||
Data = System.Text.Encoding.UTF8.GetBytes("abc")
|
||||
};
|
||||
Helpers.TestBin(packet);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void EncodeByteArray2()
|
||||
{
|
||||
var packet = new Packet(Parser.BINARY_EVENT)
|
||||
{
|
||||
Id = 0,
|
||||
Nsp = "/",
|
||||
Data = new byte[2]
|
||||
};
|
||||
Helpers.TestBin(packet);
|
||||
}
|
||||
|
||||
|
||||
|
||||
[Fact]
|
||||
public void EncodeByteArrayInJson()
|
||||
{
|
||||
var exptected = System.Text.Encoding.UTF8.GetBytes("asdfasdf");
|
||||
var _args = new List<object> { "buffa" };
|
||||
_args.Add(exptected);
|
||||
|
||||
var data = Packet.Args2JArray(_args);
|
||||
|
||||
var packet = new Packet()
|
||||
{
|
||||
Type = Parser.BINARY_EVENT,
|
||||
Id = 999,
|
||||
Nsp = "/deep",
|
||||
Data = data
|
||||
};
|
||||
Helpers.TestBin(packet);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void EncodeByteArrayDeepInJson()
|
||||
{
|
||||
var buf = System.Text.Encoding.UTF8.GetBytes("howdy");
|
||||
var jobj = new JObject();
|
||||
jobj.Add("hello","lol");
|
||||
jobj.Add("message",buf);
|
||||
jobj.Add("goodbye","gotcha");
|
||||
|
||||
var _args = new List<object> { "jsonbuff" };
|
||||
_args.Add(jobj);
|
||||
|
||||
var data = Packet.Args2JArray(_args);
|
||||
|
||||
var packet = new Packet()
|
||||
{
|
||||
Type = Parser.BINARY_EVENT,
|
||||
Id = 999,
|
||||
Nsp = "/deep",
|
||||
Data = data
|
||||
};
|
||||
Helpers.TestBin(packet);
|
||||
}
|
||||
|
||||
|
||||
// Cannot do any of the following in C# ???
|
||||
//[Fact]
|
||||
//public void EncodeDeepBinaryJSONWithNullValue()
|
||||
//{
|
||||
// var data = JObject.Parse("{a: \"b\", c: 4, e: {g: null}, h: null}");
|
||||
// data["h"].Replace(new Byte[9]);
|
||||
|
||||
// var packet = new Packet(Parser.BINARY_EVENT)
|
||||
// {
|
||||
// Id = 600,
|
||||
// Nsp = "/",
|
||||
// Data = data
|
||||
// };
|
||||
// Helpers.TestBin(packet);
|
||||
//}
|
||||
|
||||
//[Fact]
|
||||
//public void EncodeBinaryAckWithByteArray()
|
||||
//{
|
||||
// var data = JArray.Parse("[a, null, {}]");
|
||||
// data[1] = System.Text.Encoding.UTF8.GetBytes("xxx");
|
||||
|
||||
// var packet = new Packet(Parser.BINARY_ACK)
|
||||
// {
|
||||
// Id = 127,
|
||||
// Nsp = "/back",
|
||||
// Data = data
|
||||
// };
|
||||
// Helpers.TestBin(packet);
|
||||
//}
|
||||
|
||||
//[Fact]
|
||||
//public void CleanItselfUpOnClose()
|
||||
//{
|
||||
|
||||
// var packet = new Packet(Parser.ACK)
|
||||
// {
|
||||
// Id = 0,
|
||||
// Nsp = "/",
|
||||
// Data = System.Text.Encoding.UTF8.GetBytes("abc")
|
||||
// };
|
||||
|
||||
|
||||
// Encoder.Encode(packet, new Parser.Encoder.CallbackImp((encodedPackets) =>
|
||||
// {
|
||||
// var decoder = new Parser.Decoder();
|
||||
// decoder.On(Parser.Decoder.EVENT_DECODED, new ListenerImpl((args) =>
|
||||
// {
|
||||
// throw new Exception("received a packet when not all data was sent.");
|
||||
// }));
|
||||
|
||||
// decoder.Add((string)encodedPackets[0]);
|
||||
// decoder.Add((byte[])encodedPackets[1]);
|
||||
// decoder.Destroy();
|
||||
// Assert.Equal(0, decoder.Reconstructor.Buffers.Count);
|
||||
// }));
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
80
ThirdParty/SocketIoClientDotNet/Src/SocketIoClientDotNet.Tests.net45/ParserTests/Helpers.cs
vendored
Normal file
80
ThirdParty/SocketIoClientDotNet/Src/SocketIoClientDotNet.Tests.net45/ParserTests/Helpers.cs
vendored
Normal file
@@ -0,0 +1,80 @@
|
||||
using Newtonsoft.Json.Linq;
|
||||
using Quobject.EngineIoClientDotNet.ComponentEmitter;
|
||||
using Quobject.SocketIoClientDotNet.Parser;
|
||||
using System.Text;
|
||||
using Xunit;
|
||||
|
||||
namespace SocketIoClientDotNet.Tests.ParserTests
|
||||
{
|
||||
public class Helpers
|
||||
{
|
||||
private static Parser.Encoder Encoder = new Parser.Encoder();
|
||||
|
||||
public static void Test(Packet obj)
|
||||
{
|
||||
Encoder.Encode(obj, new Parser.Encoder.CallbackImp((encodedPackets) =>
|
||||
{
|
||||
var decoder = new Parser.Decoder();
|
||||
decoder.On(Parser.Decoder.EVENT_DECODED, new ListenerImpl((data1) =>
|
||||
{
|
||||
var packet = (Packet) data1;
|
||||
AssertPacket(obj, packet);
|
||||
}));
|
||||
decoder.Add((string)encodedPackets[0]);
|
||||
}));
|
||||
}
|
||||
|
||||
public static void TestBin(Packet obj)
|
||||
{
|
||||
object originalData = obj.Data;
|
||||
Encoder.Encode(obj, new Parser.Encoder.CallbackImp((encodedPackets) =>
|
||||
{
|
||||
var decoder = new Parser.Decoder();
|
||||
decoder.On(Parser.Decoder.EVENT_DECODED, new ListenerImpl((args) =>
|
||||
{
|
||||
var packet = (Packet) args;
|
||||
obj.Data = originalData;
|
||||
obj.Attachments = -1;
|
||||
AssertPacket(obj, packet);
|
||||
}));
|
||||
|
||||
foreach (var packet in encodedPackets)
|
||||
{
|
||||
if (packet is string)
|
||||
{
|
||||
decoder.Add((string)packet);
|
||||
} else if (packet is byte[])
|
||||
{
|
||||
decoder.Add((byte[])packet);
|
||||
}
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
||||
|
||||
public static void AssertPacket(Packet expected, Packet actual)
|
||||
{
|
||||
Assert.Equal(expected.Type, actual.Type);
|
||||
Assert.Equal(expected.Id, actual.Id);
|
||||
Assert.Equal(expected.Nsp, actual.Nsp);
|
||||
Assert.Equal(expected.Attachments, actual.Attachments);
|
||||
|
||||
if (expected.Data is JArray)
|
||||
{
|
||||
var exp = (JArray) expected.Data;
|
||||
var act = (JArray) expected.Data;
|
||||
Assert.Equal(exp.ToString(), act.ToString());
|
||||
}
|
||||
else if (expected.Data is JObject)
|
||||
{
|
||||
var exp = (JObject) expected.Data;
|
||||
var act = (JObject) expected.Data;
|
||||
Assert.Equal(exp.ToString(), act.ToString());
|
||||
}
|
||||
else
|
||||
{
|
||||
Assert.Equal(expected.Data.ToString(), actual.Data.ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
60
ThirdParty/SocketIoClientDotNet/Src/SocketIoClientDotNet.Tests.net45/ParserTests/ParserTest.cs
vendored
Normal file
60
ThirdParty/SocketIoClientDotNet/Src/SocketIoClientDotNet.Tests.net45/ParserTests/ParserTest.cs
vendored
Normal file
@@ -0,0 +1,60 @@
|
||||
using Newtonsoft.Json.Linq;
|
||||
using Quobject.EngineIoClientDotNet.ComponentEmitter;
|
||||
using Quobject.SocketIoClientDotNet.Parser;
|
||||
using Xunit;
|
||||
|
||||
namespace SocketIoClientDotNet.Tests.ParserTests
|
||||
{
|
||||
public class ParserTest
|
||||
{
|
||||
[Fact]
|
||||
public void Decode()
|
||||
{
|
||||
var decoder = new Parser.Decoder();
|
||||
var called = false;
|
||||
decoder.On(Parser.Decoder.EVENT_DECODED, new ListenerImpl((data1) =>
|
||||
{
|
||||
called = true;
|
||||
|
||||
}));
|
||||
decoder.Add("0/woot");
|
||||
Assert.True(called);
|
||||
}
|
||||
|
||||
|
||||
[Fact]
|
||||
public void EncodeConnection()
|
||||
{
|
||||
var packet = new Packet(Parser.CONNECT) {Nsp = "/woot"};
|
||||
Helpers.Test(packet);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void EncodeDisconnection()
|
||||
{
|
||||
var packet = new Packet(Parser.DISCONNECT) { Nsp = "/woot" };
|
||||
Helpers.Test(packet);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void EncodeEvent()
|
||||
{
|
||||
|
||||
//var packet = new Packet(Parser.EVENT) { Nsp = "/", Data = JArray.Parse("[\"a\", 1, {}]") };
|
||||
//Helpers.Test(packet);
|
||||
|
||||
//var packet2 = new Packet(Parser.EVENT) { Nsp = "/test", Data = JArray.Parse("[\"a\", 1, {}]") };
|
||||
//Helpers.Test(packet2);
|
||||
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void EncodeAck()
|
||||
{
|
||||
//var packet = new Packet(Parser.ACK) {Id = 123 , Nsp = "/", Data = JArray.Parse("[\"a\", 1, {}]") };
|
||||
//Helpers.Test(packet);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
35
ThirdParty/SocketIoClientDotNet/Src/SocketIoClientDotNet.Tests.net45/Properties/AssemblyInfo.cs
vendored
Normal file
35
ThirdParty/SocketIoClientDotNet/Src/SocketIoClientDotNet.Tests.net45/Properties/AssemblyInfo.cs
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("SocketIoClientDotNet")]
|
||||
[assembly: AssemblyDescription("Socket.IO Client Library for .Net")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("Quobject Software")]
|
||||
[assembly: AssemblyProduct("SocketIoClientDotNet")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2015")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("a95e75cd-35e6-4e88-9e22-631e3fd01546")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("0.9.12")]
|
||||
[assembly: AssemblyFileVersion("0.9.12")]
|
||||
@@ -0,0 +1,117 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="..\SocketIoClientDotNet.net45\packages\xunit.runner.visualstudio.2.1.0\build\net20\xunit.runner.visualstudio.props" Condition="Exists('..\SocketIoClientDotNet.net45\packages\xunit.runner.visualstudio.2.1.0\build\net20\xunit.runner.visualstudio.props')" />
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{EE298060-EB11-4787-804E-A1CB7EB2F597}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>SocketIoClientDotNet.Tests</RootNamespace>
|
||||
<AssemblyName>SocketIoClientDotNet.Tests.net45</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<NuGetPackageImportStamp>
|
||||
</NuGetPackageImportStamp>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="EngineIoClientDotNet, Version=1.0.4.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\SocketIoClientDotNet.net45\packages\EngineIoClientDotNet.1.0.4\lib\net45\EngineIoClientDotNet.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\SocketIoClientDotNet.net45\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="SuperSocket.ClientEngine, Version=0.9.0.0, Culture=neutral, PublicKeyToken=ee9af13f57f00acc, processorArchitecture=MSIL">
|
||||
<HintPath>..\SocketIoClientDotNet.net45\packages\SuperSocket.ClientEngine.Core.0.9.0\lib\net45\SuperSocket.ClientEngine.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Collections.Immutable, Version=1.2.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\SocketIoClientDotNet.net45\packages\System.Collections.Immutable.1.4.0\lib\portable-net45+win8+wp8+wpa81\System.Collections.Immutable.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Web" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="WebSocket4Net, Version=0.15.1.10, Culture=neutral, PublicKeyToken=eb4e154b696bf72a, processorArchitecture=MSIL">
|
||||
<HintPath>..\SocketIoClientDotNet.net45\packages\WebSocket4Net.0.15.1\lib\net45\WebSocket4Net.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="xunit.abstractions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c, processorArchitecture=MSIL">
|
||||
<HintPath>..\SocketIoClientDotNet.net45\packages\xunit.abstractions.2.0.0\lib\net35\xunit.abstractions.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="xunit.assert, Version=2.1.0.3179, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c, processorArchitecture=MSIL">
|
||||
<HintPath>..\SocketIoClientDotNet.net45\packages\xunit.assert.2.1.0\lib\dotnet\xunit.assert.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="xunit.core, Version=2.1.0.3179, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c, processorArchitecture=MSIL">
|
||||
<HintPath>..\SocketIoClientDotNet.net45\packages\xunit.extensibility.core.2.1.0\lib\dotnet\xunit.core.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="xunit.execution.desktop, Version=2.1.0.3179, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c, processorArchitecture=MSIL">
|
||||
<HintPath>..\SocketIoClientDotNet.net45\packages\xunit.extensibility.execution.2.1.0\lib\net45\xunit.execution.desktop.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="ClientTests\Connection.cs" />
|
||||
<Compile Include="ClientTests\ConnectionConstants.cs" />
|
||||
<Compile Include="ClientTests\ServerConnectionTest.cs" />
|
||||
<Compile Include="ClientTests\UrlTest.cs" />
|
||||
<Compile Include="ModuleTests\HasBinaryDataTest.cs" />
|
||||
<Compile Include="ParserTests\ByteArrayTest.cs" />
|
||||
<Compile Include="ParserTests\Helpers.cs" />
|
||||
<Compile Include="ParserTests\ParserTest.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="app.config" />
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\SocketIoClientDotNet.net45\SocketIoClientDotNet.net45.csproj">
|
||||
<Project>{b4c79cee-4b09-428a-bfe9-b276df4f57fa}</Project>
|
||||
<Name>SocketIoClientDotNet.net45</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<WCFMetadata Include="Service References\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('..\SocketIoClientDotNet.net45\packages\xunit.runner.visualstudio.2.1.0\build\net20\xunit.runner.visualstudio.props')" Text="$([System.String]::Format('$(ErrorText)', '..\SocketIoClientDotNet.net45\packages\xunit.runner.visualstudio.2.1.0\build\net20\xunit.runner.visualstudio.props'))" />
|
||||
</Target>
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
||||
@@ -0,0 +1,103 @@
|
||||
<ProjectConfiguration>
|
||||
<Settings>
|
||||
<IgnoredTests>
|
||||
<NamedTestSelector>
|
||||
<TestName>SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.MessageTest</TestName>
|
||||
</NamedTestSelector>
|
||||
<NamedTestSelector>
|
||||
<TestName>SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.MessageTestHebrew</TestName>
|
||||
</NamedTestSelector>
|
||||
<NamedTestSelector>
|
||||
<TestName>SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.OgsMessageTest</TestName>
|
||||
</NamedTestSelector>
|
||||
<NamedTestSelector>
|
||||
<TestName>SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.ReconnectEventShouldFireInSocket</TestName>
|
||||
</NamedTestSelector>
|
||||
<NamedTestSelector>
|
||||
<TestName>SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.ShouldEmitDateAsDate</TestName>
|
||||
</NamedTestSelector>
|
||||
<NamedTestSelector>
|
||||
<TestName>SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.ShouldEmitDateInObject</TestName>
|
||||
</NamedTestSelector>
|
||||
<NamedTestSelector>
|
||||
<TestName>SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.ShouldFireErrorOnSocket</TestName>
|
||||
</NamedTestSelector>
|
||||
<NamedTestSelector>
|
||||
<TestName>SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.ShouldFireReconnectEventsOnSocket</TestName>
|
||||
</NamedTestSelector>
|
||||
<NamedTestSelector>
|
||||
<TestName>SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.ShouldFireReconnectingOnSocketWithAttemptsNumberWhenReconnectingTwice</TestName>
|
||||
</NamedTestSelector>
|
||||
<NamedTestSelector>
|
||||
<TestName>SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.ShouldGetBase64DataAsALastResort</TestName>
|
||||
</NamedTestSelector>
|
||||
<NamedTestSelector>
|
||||
<TestName>SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.ShouldGetBinaryDataAsAnArraybuffer</TestName>
|
||||
</NamedTestSelector>
|
||||
<NamedTestSelector>
|
||||
<TestName>SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.ShouldNotConnectWhenAutoconnectOptionSetToFalse</TestName>
|
||||
</NamedTestSelector>
|
||||
<NamedTestSelector>
|
||||
<TestName>SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.ShouldNotTryToReconnectAndShouldFormAConnectionWhenConnectingToCorrectPortWithDefaultTimeout</TestName>
|
||||
</NamedTestSelector>
|
||||
<NamedTestSelector>
|
||||
<TestName>SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.ShouldNotTryToReconnectWithIncorrectPortWhenReconnectionDisabled</TestName>
|
||||
</NamedTestSelector>
|
||||
<NamedTestSelector>
|
||||
<TestName>SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.ShouldOpenANewNamespaceAfterConnectionGetsClosed</TestName>
|
||||
</NamedTestSelector>
|
||||
<NamedTestSelector>
|
||||
<TestName>SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.ShouldReceiveDateWithAck</TestName>
|
||||
</NamedTestSelector>
|
||||
<NamedTestSelector>
|
||||
<TestName>SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.ShouldReceiveDateWithAckAsAction</TestName>
|
||||
</NamedTestSelector>
|
||||
<NamedTestSelector>
|
||||
<TestName>SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.ShouldReceiveUtf8MultibyteCharacters</TestName>
|
||||
</NamedTestSelector>
|
||||
<NamedTestSelector>
|
||||
<TestName>SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.ShouldReconnectByDefault</TestName>
|
||||
</NamedTestSelector>
|
||||
<NamedTestSelector>
|
||||
<TestName>SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.ShouldSendBinaryDataAsAnArraybuffer</TestName>
|
||||
</NamedTestSelector>
|
||||
<NamedTestSelector>
|
||||
<TestName>SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.ShouldSendBinaryDataAsAnArraybufferMixedWithJson</TestName>
|
||||
</NamedTestSelector>
|
||||
<NamedTestSelector>
|
||||
<TestName>SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.ShouldSendEventsWithArraybuffersInTheCorrectOrder</TestName>
|
||||
</NamedTestSelector>
|
||||
<NamedTestSelector>
|
||||
<TestName>SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.ShouldTryToReconnectTwiceAndFailWhenRequestedTwoAttemptsWithImmediateTimeoutAndReconnectEnabled</TestName>
|
||||
</NamedTestSelector>
|
||||
<NamedTestSelector>
|
||||
<TestName>SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.ShouldTryToReconnectTwiceAndFailWhenRequestedTwoAttemptsWithIncorrectAddressAndReconnectEnabled</TestName>
|
||||
</NamedTestSelector>
|
||||
<NamedTestSelector>
|
||||
<TestName>SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.ShouldWorkWithAcks</TestName>
|
||||
</NamedTestSelector>
|
||||
<NamedTestSelector>
|
||||
<TestName>SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.ShouldWorkWithAcks2</TestName>
|
||||
</NamedTestSelector>
|
||||
<NamedTestSelector>
|
||||
<TestName>SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest.ShouldWorkWithFalse</TestName>
|
||||
</NamedTestSelector>
|
||||
<FixtureTestSelector>
|
||||
<FixtureName>SocketIoClientDotNet.Tests.ClientTests.UrlTest</FixtureName>
|
||||
</FixtureTestSelector>
|
||||
<FixtureTestSelector>
|
||||
<FixtureName>SocketIoClientDotNet.Tests.ModuleTests.HasBinaryDataTest</FixtureName>
|
||||
</FixtureTestSelector>
|
||||
<FixtureTestSelector>
|
||||
<FixtureName>SocketIoClientDotNet.Tests.ParserTests.ParserTest</FixtureName>
|
||||
</FixtureTestSelector>
|
||||
<FixtureTestSelector>
|
||||
<FixtureName>SocketIoClientDotNet.Tests.ParserTests.ByteArrayTest</FixtureName>
|
||||
</FixtureTestSelector>
|
||||
<FixtureTestSelector>
|
||||
<FixtureName>SocketIoClientDotNet.Tests.ClientTests.ServerConnectionTest</FixtureName>
|
||||
</FixtureTestSelector>
|
||||
</IgnoredTests>
|
||||
<PreviouslyBuiltSuccessfully>True</PreviouslyBuiltSuccessfully>
|
||||
</Settings>
|
||||
</ProjectConfiguration>
|
||||
19
ThirdParty/SocketIoClientDotNet/Src/SocketIoClientDotNet.Tests.net45/app.config
vendored
Normal file
19
ThirdParty/SocketIoClientDotNet/Src/SocketIoClientDotNet.Tests.net45/app.config
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="WebSocket4Net" publicKeyToken="eb4e154b696bf72a" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-0.14.1.0" newVersion="0.14.1.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-8.0.0.0" newVersion="8.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="SuperSocket.ClientEngine" publicKeyToken="ee9af13f57f00acc" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-0.8.0.12" newVersion="0.8.0.12" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
</configuration>
|
||||
15
ThirdParty/SocketIoClientDotNet/Src/SocketIoClientDotNet.Tests.net45/packages.config
vendored
Normal file
15
ThirdParty/SocketIoClientDotNet/Src/SocketIoClientDotNet.Tests.net45/packages.config
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="EngineIoClientDotNet" version="1.0.4" targetFramework="net45" />
|
||||
<package id="Newtonsoft.Json" version="9.0.1" targetFramework="net45" />
|
||||
<package id="SuperSocket.ClientEngine.Core" version="0.9.0" targetFramework="net45" />
|
||||
<package id="System.Collections.Immutable" version="1.4.0" targetFramework="net45" />
|
||||
<package id="WebSocket4Net" version="0.15.1" targetFramework="net45" />
|
||||
<package id="xunit" version="2.1.0" targetFramework="net45" />
|
||||
<package id="xunit.abstractions" version="2.0.0" targetFramework="net45" />
|
||||
<package id="xunit.assert" version="2.1.0" targetFramework="net45" />
|
||||
<package id="xunit.core" version="2.1.0" targetFramework="net45" />
|
||||
<package id="xunit.extensibility.core" version="2.1.0" targetFramework="net45" />
|
||||
<package id="xunit.extensibility.execution" version="2.1.0" targetFramework="net45" />
|
||||
<package id="xunit.runner.visualstudio" version="2.1.0" targetFramework="net45" />
|
||||
</packages>
|
||||
Reference in New Issue
Block a user