Interface implementation and tests
I. Cole logic in ContentManagement.Core
Interface and implementation of main business logic; Helper classes - streamInfo, ConfigurationOptions;
II. Unit tests - ContentManagement.UnitTests
Build using xUnit, VS; UnitTestsFixture - Sample dependencies for the main class (ContentManager) created here;
If mocked filesystem is passed to constructor, the filesystem is mocked as described in the same file. If new FileSystem() is pased,
File system is abstracted using System.IO.Abstractions package, for isolating it, and better testing; ContentManagerUnitTests - unit tests for each of IContentManager's methods following the scheme:
Tests for user rights are added, though they are not yet passing;
III. Integration tests- ContentManagement.IntegrationTests
Build using xUnit, VS; IntegrationTestsFixture - Sample dependencies for the main class (ContentManager) created here;
If mocked filesystem is passed to constructor, the filesystem is mocked as described in the same file. If new FileSystem() is pased,
File system is abstracted using System.IO.Abstractions package, for isolating it, and better testing; ContentManagerIntegrationTests - integration tests for the following scenarios:
[ [checks] + [gets] X [file, bytes, hash], [checks] + [updates, stores] X [bytes] + [gets] X [file, bytes], [checks] + [deletes] X [bytes] ];
[ [gets] X [file, bytes, hash] + [updates, stores, deletes] X [bytes] + [checks], [deletes] X [bytes] + [checks], [updates, stores] X [bytes] + [deletes] X [bytes] + [checks], [updates, stores] X [bytes] + [stores, updates] X [bytes] + [checks] ];
[ [gets] X [file, bytes, hash] + [deletes] X [bytes] + [gets] X [file, bytes, hash], [updates, stores] X [bytes] + [gets] X [file, bytes, hash] ];
[ [deletes] X [bytes] + [updates, stores] X [bytes] ];
[ [stores] X [bytes] + [get] X [bytes, file, hash] - checks for equality between return of different methods ];
Implemented are tests for matrixes I IV and V. II and III are in progress.
Intergration tests for rights currently are not developed. After unit tests for the same are resolved, this will be continued;