0% found this document useful (0 votes)
6 views1 page

FinanceManagement Database Testing Guide

Uploaded by

Estifanos Sahilu
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views1 page

FinanceManagement Database Testing Guide

Uploaded by

Estifanos Sahilu
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

-- Use the FinanceManagement database

USE FinanceManagement;

-- =====================
-- TESTING USER ACCOUNTS
-- =====================

-- Test: Add Accounts


CALL AddAccount(1, 'Alice\'s Checking Account');
CALL AddAccount(1, 'Alice\'s Savings Account');
CALL AddAccount(2, 'Bob\'s Personal Account');
CALL AddAccount(3, 'Charlie\'s Checking Account');

-- =====================
-- TESTING CATEGORIES
-- =====================

-- Test: Add Categories


CALL AddCategory(1, 'Groceries');
CALL AddCategory(1, 'Utilities');
CALL AddCategory(2, 'Transport');
CALL AddCategory(2, 'Entertainment');
CALL AddCategory(3, 'Health & Fitness');

-- =====================
-- TESTING TRANSACTIONS
-- =====================

-- Test: Add Transactions


CALL AddTransaction(1, 1, 120.00, 'Weekly grocery shopping', CURDATE() - INTERVAL 3
DAY);
CALL AddTransaction(2, 4, 15.00, 'Bus fare to work', CURDATE() - INTERVAL 7 DAY);
CALL AddTransaction(3, 7, 900.00, 'Monthly rent payment', CURDATE() - INTERVAL 1
DAY);

-- =====================
-- TESTING FINANCIAL SUMMARY
-- =====================

-- Test: Get Financial Summary for Alice (user_id = 1)


CALL GetFinancialSummary(1, 'weekly');
CALL GetFinancialSummary(1, 'monthly');
CALL GetFinancialSummary(1, 'yearly');

-- Test: Get Financial Summary for Bob (user_id = 2)


CALL GetFinancialSummary(2, 'weekly');
CALL GetFinancialSummary(2, 'monthly');
CALL GetFinancialSummary(2, 'yearly');

-- =====================
-- TESTING TRANSACTIONS BY ACCOUNT
-- =====================

-- Test: Get Transactions by Account for Alice's Checking Account (account_id = 1)


CALL GetTransactionsByAccount(1);

-- Test: Get Transactions by Account for Bob's Personal Account (account_id = 2)


CALL GetTransactionsByAccount(2);

You might also like