コード例 #1
0
        public void TestFindNextStaffIDSuccess()
        {
            // Arrange
            ManagementController mc = new ManagementController();
            int expected = 4;

            // Act
            int actual = mc.GetNextStaffID();

            // Assert
            Assert.AreEqual(expected, actual);
        }
コード例 #2
0
        public FormAddStaff()
        {
            InitializeComponent();

            _managementController = new ManagementController();

            // Create a random password for the new user
            passwordTxt.Text = RandomString(7);

            // Get the ID of the new user
            userIDTxt.Text = _managementController.GetNextStaffID().ToString();

            this.CancelButton = cancelBtn;
        }