From dc86753f09c6d9a03d43376d23ff384b3918d8ca Mon Sep 17 00:00:00 2001 From: Rick Falkvinge Date: Fri, 26 Oct 2018 13:01:53 +0200 Subject: [PATCH] Adding some UI test stubs --- Logic/Logic.csproj | 2 ++ Logic/UITests/IUITest.cs | 26 +++++++++++++++++++++++ Logic/UITests/Sockets.cs | 45 ++++++++++++++++++++++++++++++++++++++++ Site/Site.csproj | 1 + 4 files changed, 74 insertions(+) create mode 100644 Logic/UITests/IUITest.cs create mode 100644 Logic/UITests/Sockets.cs diff --git a/Logic/Logic.csproj b/Logic/Logic.csproj index b8ae382a..31bda0c3 100644 --- a/Logic/Logic.csproj +++ b/Logic/Logic.csproj @@ -491,6 +491,8 @@ + + diff --git a/Logic/UITests/IUITest.cs b/Logic/UITests/IUITest.cs new file mode 100644 index 00000000..e1e6d934 --- /dev/null +++ b/Logic/UITests/IUITest.cs @@ -0,0 +1,26 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Security.Cryptography.X509Certificates; +using System.Text; +using System.Threading.Tasks; + +namespace Swarmops.Logic.UITests +{ + public interface IUITest + { + string Id { get; } + string Name { get; } + void ExecuteServerSide(); + string JavaScriptClientCode { get; } + } + + public interface IUITestGroup + { + string GroupId { get; } + string GroupName { get; } + string JavaScriptClientCodeDocReady { get; } + void InitializeServerSide(); + IUITest[] Tests { get; } + } +} diff --git a/Logic/UITests/Sockets.cs b/Logic/UITests/Sockets.cs new file mode 100644 index 00000000..022cae78 --- /dev/null +++ b/Logic/UITests/Sockets.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Swarmops.Logic.UITests +{ + public class Sockets: IUITestGroup + { + public string GroupId { get { return "Sockets"; } } + + public string GroupName { get { return "Sockets"; } } + + public void InitializeServerSide() { } + + public string JavaScriptClientCodeDocReady { get { return string.Empty; } } + public IUITest[] Tests + { + get + { + return new IUITest[ ] { + new TestSocketConnecting() /*, + new TestSocketEcho(), + new TestFrontendHeartbeatReceived(), + new TestBackendHeartbeatReceived()*/ + }; + } + } + } + + public class TestSocketConnecting : IUITest + { + public string Id { get { return @"Browser"; } } + + public string Name { get { return @"Browser WebSocket connection"; } } + + public void ExecuteServerSide() + { + + } + + public string JavaScriptClientCode { get { return string.Empty; } } + } +} diff --git a/Site/Site.csproj b/Site/Site.csproj index 462e6732..83c0b60e 100644 --- a/Site/Site.csproj +++ b/Site/Site.csproj @@ -1343,6 +1343,7 @@ +