More test implementations

This commit is contained in:
Dennis Eichhorn 2018-06-29 19:05:20 +02:00
parent d9673b5ba4
commit ff5540e6f6
16 changed files with 73 additions and 57 deletions

View File

@ -24,11 +24,6 @@
this.status = status;
};
requestPermission ()
{
const self = this;
};
send (msg)
{
const tpl = document.getElementById('app-message');

View File

@ -91,7 +91,7 @@
<script>
jsOMS = {};
</script>
<script src="../../../../jsOMS/Chart/Position.enum.js"></script>
<script src="../../../../jsOMS/Chart/Position.js"></script>
<script src="../../../../jsOMS/Chart/Chart.js"></script>
<body>

View File

@ -87,7 +87,7 @@
<script>
jsOMS = {};
</script>
<script src="../../../../jsOMS/Chart/Position.enum.js"></script>
<script src="../../../../jsOMS/Chart/Position.js"></script>
<script src="../../../../jsOMS/Chart/Chart.js"></script>
<body>

View File

@ -91,7 +91,7 @@
<script>
jsOMS = {};
</script>
<script src="../../../../jsOMS/Chart/Position.enum.js"></script>
<script src="../../../../jsOMS/Chart/Position.js"></script>
<script src="../../../../jsOMS/Chart/Chart.js"></script>
<body>

View File

@ -87,7 +87,7 @@
<script>
jsOMS = {};
</script>
<script src="../../../../jsOMS/Chart/Position.enum.js"></script>
<script src="../../../../jsOMS/Chart/Position.js"></script>
<script src="../../../../jsOMS/Chart/Chart.js"></script>
<body>

View File

@ -1,12 +0,0 @@
describe('AppNotificationTest', function ()
{
"use strict";
beforeEach(function ()
{
});
afterEach(function ()
{
});
}

View File

@ -1,12 +0,0 @@
describe('BrowserNotificationTest', function ()
{
"use strict";
beforeEach(function ()
{
});
afterEach(function ()
{
});
}

View File

@ -0,0 +1,20 @@
describe('NotificationLevelTest', function ()
{
"use strict";
describe('testEnum', function ()
{
it('Testing amount of enums', function ()
{
expect(Object.keys(jsOMS.Message.Notification.NotificationLevel).length).toBe(4);
});
it('Testing values of enums', function ()
{
expect(jsOMS.Message.Notification.NotificationLevel.OK).toBe('ok');
expect(jsOMS.Message.Notification.NotificationLevel.INFO).toBe('info');
expect(jsOMS.Message.Notification.NotificationLevel.WARNING).toBe('warning');
expect(jsOMS.Message.Notification.NotificationLevel.ERROR).toBe('error');
});
});
});

View File

@ -2,11 +2,14 @@ describe('NotificationManagerTest', function ()
{
"use strict";
beforeEach(function ()
describe('testDefault', function ()
{
it('Testing default functionality', function ()
{
let manager = new jsOMS.Message.Notification.NotificationManager();
expect(manager.getAppNotifier()).toEqual(jasmine.any(jsOMS.Message.Notification.App.AppNotification));
expect(manager.getBrowserNotifier()).toEqual(jasmine.any(jsOMS.Message.Notification.Browser.BrowserNotification));
});
});
afterEach(function ()
{
});
}
});

View File

@ -2,11 +2,15 @@ describe('NotificationMessageTest', function ()
{
"use strict";
beforeEach(function ()
describe('testDefault', function ()
{
it('Testing default functionality', function ()
{
let msg = new jsOMS.Message.Notification.NotificationMessage('ok', 'abc', 'def');
expect(msg.status).toBe('ok');
expect(msg.title).toBe('abc');
expect(msg.message).toBe('def');
});
});
afterEach(function ()
{
});
}
});

View File

@ -1,12 +0,0 @@
describe('NotificationTypeTest', function ()
{
"use strict";
beforeEach(function ()
{
});
afterEach(function ()
{
});
}

View File

@ -0,0 +1,18 @@
describe('NotificationTypeTest', function ()
{
"use strict";
describe('testEnum', function ()
{
it('Testing amount of enums', function ()
{
expect(Object.keys(jsOMS.Message.Notification.NotificationType).length).toBe(2);
});
it('Testing values of enums', function ()
{
expect(jsOMS.Message.Notification.NotificationType.APP_NOTIFICATION).toBe(1);
expect(jsOMS.Message.Notification.NotificationType.BROWSER_NOTIFICATION).toBe(2);
});
});
});

View File

@ -35,6 +35,13 @@
<script src="../Event/EventManager.js"></script>
<script src="../Math/MathProcessor.js"></script>
<script src="../Message/Notification/NotificationLevel.js"></script>
<script src="../Message/Notification/NotificationType.js"></script>
<script src="../Message/Notification/NotificationMessage.js"></script>
<script src="../Message/Notification/App/AppNotification.js"></script>
<script src="../Message/Notification/Browser/BrowserNotification.js"></script>
<script src="../Message/Notification/NotificationManager.js"></script>
<script src="../Uri/Http.js"></script>
<script src="../Uri/UriFactory.js"></script>
@ -53,6 +60,11 @@
<script src="Event/EventManagerTest.js"></script>
<script src="Math/MathProcessorTest.js"></script>
<script src="Message/Notification/NotificationLevelTest.js"></script>
<script src="Message/Notification/NotificationTypeTest.js"></script>
<script src="Message/Notification/NotificationMessageTest.js"></script>
<script src="Message/Notification/NotificationManagerTest.js"></script>
<script src="Uri/HttpTest.js"></script>
<script src="Uri/UriFactoryTest.js"></script>
</head>