given that this registration form has Username, password, confirm password, full name, email and address also find the code for it. please continue the writing the test reports and write 6 more test reports. 


code:
using System;
using System.Linq;
using System.Data.OleDb;
using System.Windows.Forms;

namespace ApplianceRental
{
    public partial class RegistrationForm : Form
    {
        // Declare and initialize a new OleDbConnection object
        private readonly OleDbConnection connection = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=db_users.mdb");

        public RegistrationForm()
        {
            // Initialize UI components
            InitializeComponent();
        }

        private void Register_Click(object sender, EventArgs e)
        {
            // Check for an empty username box
            if (string.IsNullOrEmpty(textBox1.Text))
            {
                MessageBox.Show("Please enter a username.");
                return;
            }

            // Check for an empty password box
            if (string.IsNullOrEmpty(textBox2.Text))
            {
                MessageBox.Show("Please enter a password.");
                return;
            }

            // Compare password boxes for a match
            if (textBox2.Text != textBox3.Text)
            {
                MessageBox.Show("Passwords do not match.");
                return;
            }

            // Check for an empty full name box
            if (string.IsNullOrEmpty(textBox4.Text))
            {
                MessageBox.Show("Please enter your full name.");
                return;
            }

            // Check for an empty email address box
            if (string.IsNullOrEmpty(textBox5.Text))
            {
                MessageBox.Show("Please enter your email address.");
                return;
            }

            // Check for an empty address box
            if (string.IsNullOrEmpty(textBox6.Text))
            {
                MessageBox.Show("Please enter your address.");
                return;
            }

            // Check for valid password length
            if (textBox2.Text.Length < 8 || textBox2.Text.Length > 16)
            {
                MessageBox.Show("Password must be between 8 and 16 characters.");
                return;
            }

            // Check for presence of both lowercase and uppercase characters
            if (!textBox2.Text.Any(char.IsLower) || !textBox2.Text.Any(char.IsUpper))
            {
                MessageBox.Show("Password must contain at least one lowercase and one uppercase letter.");
                return;
            }

            // Open the database connection
            try
            {
                connection.Open();
            }
            catch (Exception ex)
            {
                MessageBox.Show("Error connecting to the database: " + ex.Message);
                return;
            }

            // Insert the user’s registration data into the database
            try
            {
                using (var cmd = new OleDbCommand())
                {
                    cmd.Connection = connection;
                    cmd.CommandText = "INSERT INTO tbl_users(username, [password], fullname, email, address, [User Type]) " +
                    "VALUES(@username, @password, @fullname, @email, @address, ‘Customer’)";

                    cmd.Parameters.AddWithValue("@username", textBox1.Text);
                    cmd.Parameters.AddWithValue("@password", textBox2.Text);
                    cmd.Parameters.AddWithValue("@fullname", textBox4.Text);
                    cmd.Parameters.AddWithValue("@email", textBox5.Text);
                    cmd.Parameters.AddWithValue("@address", textBox6.Text);

                    cmd.ExecuteNonQuery();
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("Error inserting data into the database: " + ex.Message);
                return;
            }
            finally
            {
                // Close the database connection
                connection.Close();
            }

            // Inform the user that the registration was successful
            MessageBox.Show("Registration successful!");

            // Clear input fields
            ClearFields();

            // Hide this form and show the main form
            this.Hide();
            new Form1().Show();
        }

        // Clear input fields
        private void ClearFields()
        {
            textBox1.Text = "";
            textBox2.Text = "";
            textBox3.Text = "";
            textBox4.Text = "";
            textBox5.Text = "";
            textBox6.Text = "";
        }

        // Event handlers for text-changed events (placeholders)
        private void textBox1_TextChanged(object sender, EventArgs e) { }
        private void textBox2_TextChanged(object sender, EventArgs e) { }
        private void textBox3_TextChanged(object sender, EventArgs e) { }
        private void textBox4_TextChanged(object sender, EventArgs e) { }
        private void textBox5_TextChanged(object sender, EventArgs e) { }
        private void textBox6_TextChanged(object sender, EventArgs e) { }
    }
}

Test Reports:
1.Objective: Validate the user registration with valid input data and verify successful registration
Expected Result: User should be registered successfully and a “Registration successful!” mes-sage should be displayed.

2.Objective: Validate the user registration with a mismatched password and verify the error message
Expected Result: User should not be registered, and the error message “Passwords do not match.” should be displayed.

3.Objective: Validate the user registration with a password shorter than 8 characters
Expected Result: User should not be registered, and the error message “Password must be be-tween 8 and 16 characters.” should be displayed.

4.Objective: Validate the user registration with a password without lowercase or uppercase characters
Expected Result: User should not be registered, and the error message “Password must con-tain at least one lowercase and one uppercase letter.” should be displayed.