Beispiel #1
0
        public void ChangeHead_ValidData_ChangesHead()
        {
            CompanyManager cm = new CompanyManager(new Company("Test"));

            cm.NewHead("Head");
            cm.ChangeHead("SecondHead");
        }
Beispiel #2
0
        public void ChangeHead_ExistedPositionName_ShouldThrowPositionAlreadyExistsException()
        {
            CompanyManager cm = new CompanyManager(new Company("Test"));

            cm.NewHead("Head");
            cm.AddManager("SecondHead", "Head");
            Assert.ThrowsException <PositionAlreadyExistsException>(() => cm.ChangeHead("SecondHead"));
        }
Beispiel #3
0
        public void ChangeHead_HeadDoesNotExist_ShouldThrowCompanyHeadException()
        {
            CompanyManager cm = new CompanyManager(new Company("Test"));

            Assert.ThrowsException <CompanyHeadException>(() => cm.ChangeHead("SecondHead"));
        }