public void TextTest() { var rootPath = StoragePaths.CreateStorageFolder(); var _store = FileStore.GetStore(rootPath); long docId = _store.StoreText("the content"); Assert.Equal("the content", _store.LoadText(docId)); }
public void Id_Generateor_Tests() { var storagePath = StoragePaths.CreateStorageFolder(); var core = new Core(storagePath); // generating ids in root without any clusters Assert.Equal(1, core.GetNewStoreId()); Assert.Equal(2, core.GetNewStoreId()); // generating ids in `news` cluster Assert.Equal(1, core.GetNewStoreId("news")); Assert.Equal(2, core.GetNewStoreId("news")); Assert.Equal(3, core.GetNewStoreId("news")); Assert.Equal(4, core.GetNewStoreId("news")); // generating ids in `articles` cluster Assert.Equal(1, core.GetNewStoreId("articles")); Assert.Equal(2, core.GetNewStoreId("articles")); Assert.Equal(3, core.GetNewStoreId("articles")); }
public CoreTests() { StoragePaths.CleanRoots(); StoragePath = StoragePaths.CreateStorageFolder(); }
public FileStoreTests() { StoragePaths.CleanRoots(); StoragePath1 = StoragePaths.CreateStorageFolder(); StoragePath2 = StoragePaths.CreateStorageFolder(); }