about summary refs log tree commit diff
path: root/Tests/LibMatrix.Tests/DataTests/WhoAmITests.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/LibMatrix.Tests/DataTests/WhoAmITests.cs')
-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);
+    }
+}