about summary refs log tree commit diff
path: root/Tests/LibMatrix.Tests/DataTests
diff options
context:
space:
mode:
authorTheArcaneBrony <myrainbowdash949@gmail.com>2023-09-29 19:38:00 +0200
committerTheArcaneBrony <myrainbowdash949@gmail.com>2023-09-29 19:38:00 +0200
commit46df5b8e335754f1582fc4d41d9546808ed8ee66 (patch)
tree29fed832bed495f1bd233c37275cb560c19f34cf /Tests/LibMatrix.Tests/DataTests
parentAdd more stuff, add unit tests (diff)
downloadLibMatrix-46df5b8e335754f1582fc4d41d9546808ed8ee66.tar.xz
Unit tests, small refactors
Diffstat (limited to 'Tests/LibMatrix.Tests/DataTests')
-rw-r--r--Tests/LibMatrix.Tests/DataTests/WhoAmITests.cs10
1 files changed, 10 insertions, 0 deletions
diff --git a/Tests/LibMatrix.Tests/DataTests/WhoAmITests.cs b/Tests/LibMatrix.Tests/DataTests/WhoAmITests.cs
new file mode 100644
index 0000000..f737363
--- /dev/null
+++ b/Tests/LibMatrix.Tests/DataTests/WhoAmITests.cs
@@ -0,0 +1,10 @@
+namespace LibMatrix.Tests.DataTests;
+
+public static class WhoAmITests {
+    public static void VerifyRequiredFields(this WhoAmIResponse obj, bool isAppservice = false) {
+        Assert.NotNull(obj);
+        Assert.NotNull(obj.UserId);
+        if(!isAppservice)
+            Assert.NotNull(obj.DeviceId);
+    }
+}