From 97625b2bfbeac1030492d3e73bb26b0b99a268c4 Mon Sep 17 00:00:00 2001 From: madhuka Date: Mon, 29 Jun 2015 12:53:03 +0530 Subject: [PATCH] Test Usecase adding --- test/spec/controllers/use-case-test.js | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 test/spec/controllers/use-case-test.js diff --git a/test/spec/controllers/use-case-test.js b/test/spec/controllers/use-case-test.js new file mode 100644 index 0000000..5f75322 --- /dev/null +++ b/test/spec/controllers/use-case-test.js @@ -0,0 +1,24 @@ +'use strict'; +describe("apacheZeppelinGsocApp UseCase Testing", function() { + beforeEach(module("apacheZeppelinGsocApp")); + var myChart; + beforeEach(inject(function(GoogleChartFactory,HighChartFactory,NVD3ChartFactory) { + //making mock chart called mychart from GoogleChartFactory + myChart = GoogleChartFactory; + })); + //testing for Google chart factory + describe("Switching Chart Types", function() { + it(" from default chart type to line then to bar", function() { + expect(myChart).toBeDefined(); + expect(myChart.libname).toBe('googleChart'); + expect(myChart.viewModel.type).toBe('BarChart'); + myChart.setChartType('Line'); + expect(myChart.viewModel.type).toBe('LineChart'); + myChart.setChartType('Bar'); + expect(myChart.viewModel.type).toBe('BarChart'); + }); + it(" using google chart library", function() { + + }); + }); +}); \ No newline at end of file