Added app, tests, lint to BUCK file for web/gui2
Change-Id: I94912cb18f31db26971b66c9d851fb57f022df54
diff --git a/web/gui2/src/main/webapp/tests/app/fw/util/random.service.spec.ts b/web/gui2/src/main/webapp/tests/app/fw/util/random.service.spec.ts
index 969ad69..726fc92 100644
--- a/web/gui2/src/main/webapp/tests/app/fw/util/random.service.spec.ts
+++ b/web/gui2/src/main/webapp/tests/app/fw/util/random.service.spec.ts
@@ -15,19 +15,31 @@
*/
import { TestBed, inject } from '@angular/core/testing';
+import { LogService } from '../../../../app/log.service';
+import { ConsoleLoggerService } from '../../../../app/consolelogger.service';
import { RandomService } from '../../../../app/fw/util/random.service';
+import { FnService } from '../../../../app/fw/util/fn.service';
+
+class MockFnService {}
/**
* ONOS GUI -- Random -- Encapsulated randomness - Unit Tests
*/
describe('RandomService', () => {
- beforeEach(() => {
- TestBed.configureTestingModule({
- providers: [RandomService]
- });
- });
+ let log: LogService;
- it('should be created', inject([RandomService], (service: RandomService) => {
- expect(service).toBeTruthy();
- }));
+ beforeEach(() => {
+ log = new ConsoleLoggerService();
+
+ TestBed.configureTestingModule({
+ providers: [RandomService,
+ { provide: LogService, useValue: log },
+ { provide: FnService, useClass: MockFnService },
+ ]
+ });
+ });
+
+ it('should be created', inject([RandomService], (service: RandomService) => {
+ expect(service).toBeTruthy();
+ }));
});