File tree 1 file changed +36
-0
lines changed
output/csharp/src/Seam.Test/Client
1 file changed +36
-0
lines changed Original file line number Diff line number Diff line change @@ -87,4 +87,40 @@ public void Test()
87
87
{
88
88
Assert . Throws < SeamException > ( ( ) => seam . AccessCodes . Get ( accessCodeId : "nonexistent" ) ) ;
89
89
}
90
+
91
+ [ Fact ]
92
+ public void TestDelete ( )
93
+ {
94
+ var device = seam . Devices
95
+ . List ( )
96
+ . First ( d => d . DeviceType == Device . DeviceTypeEnum . AugustLock ) ;
97
+
98
+ Assert . NotNull ( device ) ;
99
+
100
+ seam . Devices . Delete ( deviceId : device . DeviceId ) ;
101
+
102
+ var device2 = seam . Devices
103
+ . List ( )
104
+ . First ( d => d . DeviceType == Device . DeviceTypeEnum . AugustLock ) ;
105
+
106
+ Assert . NotEqual ( device . DeviceId , device2 . DeviceId ) ;
107
+ }
108
+
109
+ [ Fact ]
110
+ public async void TestDeleteAsync ( )
111
+ {
112
+ var device = ( await seam . Devices . ListAsync ( ) ) . First (
113
+ d => d . DeviceType == Device . DeviceTypeEnum . AugustLock
114
+ ) ;
115
+
116
+ Assert . NotNull ( device ) ;
117
+
118
+ await seam . Devices . DeleteAsync ( deviceId : device . DeviceId ) ;
119
+
120
+ var device2 = ( await seam . Devices . ListAsync ( ) ) . First (
121
+ d => d . DeviceType == Device . DeviceTypeEnum . AugustLock
122
+ ) ;
123
+
124
+ Assert . NotEqual ( device . DeviceId , device2 . DeviceId ) ;
125
+ }
90
126
}
You can’t perform that action at this time.
0 commit comments