示例#1
0
        public void TestRecreateScanLines()
        {
            InvadersViewModel viewModel = new InvadersViewModel();
            int oldScanLines            = viewModel.ScanLines.Count;

            viewModel.RecreateScanLines();
            int newScanLines = viewModel.ScanLines.Count;

            Assert.AreNotEqual(oldScanLines, newScanLines, "Should not be equal. \"newScanLines\" should contain Scan Lines.");
        }
示例#2
0
        public void TestEmptySculpturePicture()
        {
            //Arrange
            _sculpturePicture = string.Empty;

            //Act
            _testSculpture.Sculpture_Picture = _sculpturePicture;

            //Assert
            Assert.AreNotEqual(_sculpturePicture, _testSculpture.Sculpture_Picture);
        }
示例#3
0
        public void TestMethod3()
        {
            //Testcase 1.3
            _mainViewModel.LoginOrLogoutBox = "22";
            Assert.AreEqual("22", _mainViewModel.LoginOrLogoutBox);

            var lastLoginBeforeLogin = _testEmployee.LastLogin;

            _employeeHandler.LoginOrLogout();                                  //Employee logs in

            Assert.AreNotEqual(_testEmployee.LastLogin, lastLoginBeforeLogin); //Checks if the last logged in employee has had his LastLogin attribute updated properly.
        }
示例#4
0
        public void TestMethod6()
        {
            //Testcase 1.6
            _mainViewModel.LoginOrLogoutBox = "50";
            Assert.AreEqual("50", _mainViewModel.LoginOrLogoutBox);

            var totalHoursBeforeLogout = _testEmployee2.TotalHours;

            _employeeHandler.LoginOrLogout(); //Employee logs out

            Assert.AreNotEqual(_testEmployee2.TotalHours, totalHoursBeforeLogout);
        }
示例#5
0
        public void TestMethod5()
        {
            //Testcase 1.5
            _mainViewModel.LoginOrLogoutBox = "50";
            Assert.AreEqual("50", _mainViewModel.LoginOrLogoutBox);

            var lastLogoutBeforeLogout = _testEmployee2.LastLogout;

            _employeeHandler.LoginOrLogout(); //Employee logs out

            Assert.AreNotEqual(_testEmployee2.LastLogout, lastLogoutBeforeLogout);
        }