Exemplo n.º 1
0
        public void TestCatalogActionsConfigure()
        {
            IDataManager      dataManager      = new TestDataManager();
            ICatalogueActions catalogueActions = new CatalogueActions(dataManager);

            catalogueActions.ConfigureApplication();//since this does nothing, easy pass
        }
Exemplo n.º 2
0
        public void TestCatalogActionsInsert()
        {
            IDataManager      dataManager      = new TestDataManager();
            ICatalogueActions catalogueActions = new CatalogueActions(dataManager);

            catalogueActions.AddRecord("BatmanTest");
        }
Exemplo n.º 3
0
        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);
        }
Exemplo n.º 4
0
        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);
        }
Exemplo n.º 5
0
        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);
        }