File tree 1 file changed +21
-1
lines changed
1 file changed +21
-1
lines changed Original file line number Diff line number Diff line change 1
1
using System ;
2
2
using System . IO ;
3
+ using System . Linq ;
3
4
using System . Threading . Tasks ;
4
5
using LibVLCSharp ;
5
6
using NUnit . Framework ;
@@ -11,7 +12,7 @@ public class EventManagerTests : BaseSetup
11
12
{
12
13
[ Test ]
13
14
[ Ignore ( "event does not fire in unit test" ) ]
14
- public async Task MetaChangedEventSubscribe ( )
15
+ public void MetaChangedEventSubscribe ( )
15
16
{
16
17
var media = new Media ( Path . GetTempFileName ( ) ) ;
17
18
var eventHandlerCalled = false ;
@@ -42,5 +43,24 @@ public async void DurationChanged()
42
43
Assert . True ( called ) ;
43
44
Assert . NotZero ( duration ) ;
44
45
}
46
+
47
+ [ Test ]
48
+ public void MetaExtraTest ( )
49
+ {
50
+ var key = "key" ;
51
+ var value = "value" ;
52
+
53
+ var media = new Media ( LocalAudioFile ) ;
54
+
55
+ media . SetMetaExtra ( key , value ) ;
56
+
57
+ Assert . AreEqual ( value , media . MetaExtra ( key ) ) ;
58
+ Assert . AreEqual ( key , media . MetaExtraNames . Single ( ) ) ;
59
+
60
+ media . SetMetaExtra ( key , null ) ;
61
+
62
+ Assert . AreEqual ( null , media . MetaExtra ( key ) ) ;
63
+ Assert . IsEmpty ( media . MetaExtraNames ) ;
64
+ }
45
65
}
46
66
}
You can’t perform that action at this time.
0 commit comments