added example files

This commit is contained in:
2018-02-18 00:18:16 +01:00
parent 3654c08bc2
commit e5ae0c75cf
17 changed files with 342 additions and 0 deletions

20
dist/view/MusicComponent.js vendored Normal file
View File

@@ -0,0 +1,20 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var MusicCatalogService_1 = require("../domain/services/MusicCatalogService");
var VinylCatalog_1 = require("../adapters/music/VinylCatalog");
var MusicComponent = /** @class */ (function () {
function MusicComponent() {
var container = {
IMusicRepository: function () { return new VinylCatalog_1.VinylCatalog(); }
};
var inject = function (name) {
if (container[name]) {
return container[name];
}
throw new Error("Failed to resolve " + name);
};
var musicCatalogService = new MusicCatalogService_1.MusicCatalogService(inject("IMusicRepository"));
}
return MusicComponent;
}());
exports.MusicComponent = MusicComponent;

9
dist/view/MusicComponent.spec.js vendored Normal file
View File

@@ -0,0 +1,9 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var MusicComponent_1 = require("./MusicComponent");
describe("MusicComponent", function () {
it('should create a new MusicComponent', function (done) {
var musicComponent = new MusicComponent_1.MusicComponent();
done();
});
});