Exemplo n.º 1
0
        public void TestRemoveItem(string itemName, string itemIndex)
        {
            string addItemResult    = ServiceHelper.PostRequest(ServiceHelper.item, Token, itemName, itemIndex);
            string removeItemResult = ServiceHelper.DeleteRequest(ServiceHelper.item, Token, itemIndex);

            actualResponse = ServiceHelper.GetRequest(ServiceHelper.items, Token);

            Log("Test Remove Item:" + "\n" + $"result add item = {addItemResult} " + "\n" +
                $"result remove item = {removeItemResult}" + "\n" +
                $"items in data base = {actualResponse}");

            StringAssert.DoesNotContain(itemName, actualResponse);
        }
Exemplo n.º 2
0
        public void TestRemoveUser(string userName, string userPassword, string adminRights)
        {
            string addUserResult =
                ServiceHelper.PostRequest(ServiceHelper.user, Token, userName, userPassword, adminRights);
            string removeResult = ServiceHelper.DeleteRequest(ServiceHelper.user, Token, userName);

            actualResponse = ServiceHelper.GetRequest(ServiceHelper.users, Token);

            Log("Test Remove User:"******"\n" + $"result add user: {addUserResult} " + "\n" +
                $"result remove user: {removeResult}" + "\n" +
                $"users in data base: {actualResponse}");

            StringAssert.DoesNotContain(userName, actualResponse);
        }