File tree 3 files changed +46
-1
lines changed 3 files changed +46
-1
lines changed Original file line number Diff line number Diff line change @@ -44,6 +44,7 @@ to be used in your tests it should be safe to pull into a project.
44
44
- GoogleAnalyics
45
45
- Keyboard
46
46
- Network
47
+ - NFC
47
48
- Splashscreen
48
49
- StatusBar
49
50
Original file line number Diff line number Diff line change @@ -4,12 +4,14 @@ import { StatusBarMock } from './status-bar';
4
4
import { ThreeDeeTouchMock } from './three-dee-touch' ;
5
5
import { NetworkMock } from './network' ;
6
6
import { GoogleAnalyticsMock } from './google-analytics' ;
7
+ import { NFCMock } from './nfc' ;
7
8
8
9
export {
9
10
KeyboardMock ,
10
11
SplashScreenMock ,
11
12
StatusBarMock ,
12
13
ThreeDeeTouchMock ,
13
14
NetworkMock ,
14
- GoogleAnalyticsMock
15
+ GoogleAnalyticsMock ,
16
+ NFCMock
15
17
} ;
Original file line number Diff line number Diff line change
1
+ import { Observable } from 'rxjs/Observable' ;
2
+
3
+ export class NFCMock {
4
+ public static instance ( ) : any {
5
+ let instance = jasmine . createSpyObj ( 'NFC' , [
6
+ 'addNdefListener' ,
7
+ 'addTagDiscoveredListener' ,
8
+ 'addMimeTypeListener' ,
9
+ 'addNdefFormatableListener' ,
10
+ 'write' ,
11
+ 'makeReadyOnly' ,
12
+ 'share' ,
13
+ 'unshare' ,
14
+ 'erase' ,
15
+ 'handover' ,
16
+ 'stopHandover' ,
17
+ 'showSettings' ,
18
+ 'enabled' ,
19
+ 'bytesToString' ,
20
+ 'stringToBytes' ,
21
+ 'bytesToHexString'
22
+ ] ) ;
23
+ instance . addNdefListener . and . returnValue ( Observable . empty ( ) ) ;
24
+ instance . addTagDiscoveredListener . and . returnValue ( Observable . empty ( ) ) ;
25
+ instance . addMimeTypeListener . and . returnValue ( Observable . empty ( ) ) ;
26
+ instance . addNdefFormatableListener . and . returnValue ( Observable . empty ( ) ) ;
27
+ instance . write . and . returnValue ( Observable . empty ( ) ) ;
28
+ instance . makeReadyOnly . and . returnValue ( Observable . empty ( ) ) ;
29
+ instance . share . and . returnValue ( Observable . empty ( ) ) ;
30
+ instance . unshare . and . returnValue ( Observable . empty ( ) ) ;
31
+ instance . erase . and . returnValue ( Observable . empty ( ) ) ;
32
+ instance . handover . and . returnValue ( Observable . empty ( ) ) ;
33
+ instance . stopHandover . and . returnValue ( Observable . empty ( ) ) ;
34
+ instance . showSettings . and . returnValue ( Observable . empty ( ) ) ;
35
+ instance . enabled . and . returnValue ( Observable . empty ( ) ) ;
36
+ instance . bytesToString . and . returnValue ( '' ) ;
37
+ instance . stringToBytes . and . returnValue ( [ ] ) ;
38
+ instance . bytesToHexString . and . returnValue ( '' ) ;
39
+
40
+ return instance ;
41
+ }
42
+ }
You can’t perform that action at this time.
0 commit comments