Fixed the test cases,added sonar config
[portal.git] / portal-FE-os / src / testing / router-link-directive-stub.ts
diff --git a/portal-FE-os/src/testing/router-link-directive-stub.ts b/portal-FE-os/src/testing/router-link-directive-stub.ts
new file mode 100644 (file)
index 0000000..73e75cb
--- /dev/null
@@ -0,0 +1,14 @@
+import { Directive, Input, HostListener } from "@angular/core";
+
+@Directive({
+    selector: '[routerLink]'
+  })
+  export class RouterLinkDirectiveStub {
+    @Input('routerLink') linkParams: any;
+    navigatedTo: any = null;
+  
+    @HostListener('click')
+    onClick() {
+      this.navigatedTo = this.linkParams;
+    }
+  }
\ No newline at end of file