-
Notifications
You must be signed in to change notification settings - Fork 83
Expand file tree
/
Copy pathXmppSoftwareVersionTests.cs
More file actions
48 lines (42 loc) · 1.11 KB
/
XmppSoftwareVersionTests.cs
File metadata and controls
48 lines (42 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System.Threading.Tasks;
using Waher.Networking.XMPP.SoftwareVersion;
using Waher.Runtime.Console;
namespace Waher.Networking.XMPP.Test
{
[TestClass]
public class XmppSoftwareVersionTests : CommunicationTests
{
[ClassInitialize]
public static void ClassInitialize(TestContext _)
{
SetupSnifferAndLog();
}
[ClassCleanup]
public static async Task ClassCleanup()
{
await DisposeSnifferAndLog();
}
[TestMethod]
public async Task SoftwareVersion_Test_01_Server()
{
await this.ConnectClients();
SoftwareVersionEventArgs e = this.client1.SoftwareVersion(this.client1.Domain, 10000);
Print(e);
}
private static void Print(SoftwareVersionEventArgs e)
{
ConsoleOut.WriteLine();
ConsoleOut.WriteLine("Name: " + e.Name);
ConsoleOut.WriteLine("Version: " + e.Version);
ConsoleOut.WriteLine("OS: " + e.OS);
}
[TestMethod]
public async Task SoftwareVersion_Test_02_Client()
{
await this.ConnectClients();
SoftwareVersionEventArgs e = this.client1.SoftwareVersion(this.client1.FullJID, 10000);
Print(e);
}
}
}