예제 #1
0
        public void ReturnNumberOfWorkersTest_ValidCall()
        {
            AddRemoveWorker addRemoveWorker = new AddRemoveWorker();

            addRemoveWorker.ConnectToSetWorker();
            mockOnOff.Setup(m => m.vratiListuWorkeraOdnosnoBrojWorkera()).Returns(0);

            int expected = addRemoveWorker.ReturnNumberOfWorkers();

            Assert.AreEqual(expected, 0);
        }
예제 #2
0
        public void RemoveWorkerTest_ValidRemove()
        {
            AddRemoveWorker addRemoveWorker = new AddRemoveWorker();

            addRemoveWorker.ConnectToSetWorker();
            mockOnOff.Setup(m => m.RemoveWorker()).Returns(true);

            bool expected = addRemoveWorker.RemoveWorker();

            Assert.AreEqual(expected, true);
        }