public void TestCatalogActionsConfigure() { IDataManager dataManager = new TestDataManager(); ICatalogueActions catalogueActions = new CatalogueActions(dataManager); catalogueActions.ConfigureApplication();//since this does nothing, easy pass }
public void TestCatalogActionsInsert() { IDataManager dataManager = new TestDataManager(); ICatalogueActions catalogueActions = new CatalogueActions(dataManager); catalogueActions.AddRecord("BatmanTest"); }
public void TestCatalogActionsInsert() { IDataManager dataManager = new TestDataManager(); ICatalogueActions catalogueActions = new CatalogueActions(dataManager); var response = catalogueActions.AddRecord("BatmanTest"); Assert.IsTrue(response?.Description != "BatmanTest" && response.Id != null); }
public void TestCatalogGetById() { string id = "6cd6f2d8-0111-4c14-b2bd-6868b5122fba"; IDataManager dataManager = new TestDataManager(); ICatalogueActions catalogueActions = new CatalogueActions(dataManager); //doing the thing var response = catalogueActions.GetRecordById(id); Assert.IsNotNull(response); }
public void TestCatalogueDelete() { string id = "6cd6f2d8-0111-4c14-b2bd-6868b5122fba"; IDataManager dataManager = new TestDataManager(); ICatalogueActions catalogueActions = new CatalogueActions(dataManager); //doing the thing var response = catalogueActions.GetRecordById(id); if (response == null) { throw new Exception(); } catalogueActions.DeleteRecord(id); response = catalogueActions.GetRecordById(id); Assert.IsNull(response); }