My first task for this year is to create a set of tasks for the Mobile Bluetooth Device Connectivity at NEXJ CDOT Seneca. Bellow is a simple test that will be built upon with the necessary functionality to fully test the Bluetooth project:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>NexJ Medical Bluetooth Adapter JavaScript Test</title>
<link rel="stylesheet" type="text/css" href="../libs/css/qunit-1.11.0.css" />
</head>
<body>
<div id="qunit"></div>
<div id="qunit-fixture"></div>
<script type="text/javascript" src="../libs/js/qunit-1.11.0.js"></script>
<script type="text/javascript" src="../libs/js/cordova-2.5.0.js"></script>
<script type="text/javascript" src="../medicalDevicePlugin.js"></script>
<script type="text/javascript" src="demo.js"></script>
<script src="test.js"></script>
</body>
</html>
For example the following Test shows that the window application for the Bluetooth mobile device is undefined. For this test I am using Qunit. So a test has been written for this:
test( "a basic test example", function() {
var value = "hello";
equal( value, "hello", "We expect value to be hello" );
if(typeof app == "undefined")
{
var testAppp = "undefined";
equal( testAppp, "undefined", "undefined" );
}else if(typeof app != "undefined")
{
var testAppp = "defined";
equal( testAppp, "undefined", "undefined" );
}
});
No comments:
Post a Comment