feat: add certification thing

This commit is contained in:
Thea Schöbl
2023-05-15 13:38:11 +00:00
parent b21dc75964
commit fd63fb764f
68 changed files with 6776 additions and 24439 deletions

View File

@@ -12,10 +12,10 @@
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
import {expect} from 'chai';
import {slow, suite, test, timeout} from '@testdeck/mocha';
import {SCBulkRoute} from '../src/protocol/routes/bulk-request';
import {expect} from 'chai';
import {SCBulkAddRoute} from '../src/protocol/routes/bulk-add';
import {SCBulkRoute} from '../src/protocol/routes/bulk-request';
import {SCThingUpdateRoute} from '../src/protocol/routes/thing-update';
@suite(timeout(10000), slow(5000))
@@ -24,9 +24,11 @@ export class RoutesSpec {
public bulkAddRouteUrlPath() {
const bulkAddRoute = new SCBulkAddRoute();
expect(bulkAddRoute.getUrlPath({
UID: '540862f3-ea30-5b8f-8678-56b4dc217140',
})).to.equal('/bulk/540862f3-ea30-5b8f-8678-56b4dc217140');
expect(
bulkAddRoute.getUrlPath({
UID: '540862f3-ea30-5b8f-8678-56b4dc217140',
}),
).to.equal('/bulk/540862f3-ea30-5b8f-8678-56b4dc217140');
}
@test
@@ -40,10 +42,12 @@ export class RoutesSpec {
public thingUpdateRouteUrlPath() {
const thingUpdateRoute = new SCThingUpdateRoute();
expect(thingUpdateRoute.getUrlPath({
TYPE: 'dish',
UID: '540862f3-ea30-5b8f-8678-56b4dc217140',
})).to.equal('/dish/540862f3-ea30-5b8f-8678-56b4dc217140');
expect(
thingUpdateRoute.getUrlPath({
TYPE: 'dish',
UID: '540862f3-ea30-5b8f-8678-56b4dc217140',
}),
).to.equal('/dish/540862f3-ea30-5b8f-8678-56b4dc217140');
}
@test
@@ -72,6 +76,6 @@ export class RoutesSpec {
});
};
expect(fn).to.throw('Parameter \'TYPE\' not provided.');
expect(fn).to.throw("Parameter 'TYPE' not provided.");
}
}