aboutsummaryrefslogtreecommitdiffstats
path: root/tests/projects/plugins/project/test/js
diff options
context:
space:
mode:
Diffstat (limited to 'tests/projects/plugins/project/test/js')
-rw-r--r--tests/projects/plugins/project/test/js/PersonTest.js13
-rw-r--r--tests/projects/plugins/project/test/js/com/company/CarTest.js18
2 files changed, 31 insertions, 0 deletions
diff --git a/tests/projects/plugins/project/test/js/PersonTest.js b/tests/projects/plugins/project/test/js/PersonTest.js
new file mode 100644
index 00000000000..36b8fb05af5
--- /dev/null
+++ b/tests/projects/plugins/project/test/js/PersonTest.js
@@ -0,0 +1,13 @@
+TestCase('PersonTest', {
+
+ testWhoAreYou : function() {
+ var p = new Person('John', 'Doe', 'P.');
+ assertEquals('Should have responded with full name', 'John P. Doe', p.whoAreYou());
+ },
+
+ testWhoAreYouWithNoMiddleName : function() {
+ var p = new Person('John', 'Doe');
+ assertEquals('Should have used only first and last name', 'John Doe', p.whoAreYou());
+ }
+
+}); \ No newline at end of file
diff --git a/tests/projects/plugins/project/test/js/com/company/CarTest.js b/tests/projects/plugins/project/test/js/com/company/CarTest.js
new file mode 100644
index 00000000000..b63b17d1f69
--- /dev/null
+++ b/tests/projects/plugins/project/test/js/com/company/CarTest.js
@@ -0,0 +1,18 @@
+TestCase('com.company.CarTest', {
+
+ testfullName : function() {
+ var car = new Car('VW', 'Beatle', 1971);
+ assertEquals('VW Beatle Y: 1971', car.getFullName());
+ },
+
+ testStopEngineWithCheck : function() {
+ var car = new Car('VW', 'Beatle', 1971);
+ assertEquals('engine was not running', car.stopEngineWithCheck());
+ },
+
+ testCalculatePrice : function() {
+ var car = new Car('Volvo', 'XC70', 2012);
+ assertEquals('$30000', car.calculatePrice());
+ }
+
+}); \ No newline at end of file