Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

a RingElement is an Element

  • Loading branch information...
commit 94dad831a7b2635803481a41283ae6a8f1ad914a 1 parent dd2eebb
@fibo authored
Showing with 66 additions and 0 deletions.
  1. +15 −0 lib/RingElement.js
  2. +27 −0 test/Collection.js
  3. +24 −0 test/Element.js
View
15 lib/RingElement.js
@@ -0,0 +1,15 @@
+
+var util = require('util');
+
+var Element = require('./Element.js');
+
+function RingElement() {
+ var self = this;
+
+ Element.call(self, arguments);
+};
+
+util.inherits(RingElement, Element);
+
+module.exports = RingElement;
+
View
27 test/Collection.js
@@ -0,0 +1,27 @@
+
+var assert = require('assert');
+var algebra = require('../index.js');
+
+var Collection = algebra.Collection;
+var Element = algebra.Element;
+
+var e1 = new Element();
+var e2 = new Element();
+var elements = [e1, e2];
+
+describe('Collection', function () {
+ describe('constructor:', function () {
+ it('accepts an array of elements as sinle argument', function () {
+ var collection = new Collection(elements);
+
+ assert.ok(collection instanceof Collection);
+ });
+ });
+
+ describe('getElements()', function () {
+ it('returns the collection\'s elements', function () {
+
+ });
+ });
+});
+
View
24 test/Element.js
@@ -0,0 +1,24 @@
+
+var assert = require('assert');
+var algebra = require('../index.js');
+
+var Element = algebra.Element;
+
+describe('Element', function () {
+ describe('constructor:', function () {
+ it('', function () {
+ });
+ });
+
+ describe('getData()', function () {
+ it('is an abstract function', function () {
+ });
+ });
+
+ describe('setData()', function () {
+ it('is an abstract function', function () {
+ });
+ });
+});
+
+
Please sign in to comment.
Something went wrong with that request. Please try again.