public static object createObject(string actorObjectType = null, int empId = 0, string empName = null, string empSname = null) { // Would use SRP, but no time switch (actorObjectType) { case "announcer": Announcer announcer = new Announcer(empId, empName, empSname); return(announcer); case "doorman": DoorMan doorMan = new DoorMan(empId, empName, empSname); return(doorMan); case "driver": Driver driver = new Driver(empId, empName, empSname); return(driver); case "security": Security security = new Security(empId, empName, empSname); return(security); case "ticketchecker": TicketChecker ticketChecker = new TicketChecker(empId, empName, empSname); return(ticketChecker); case "ticketclerk": TicketClerk ticketClerk = new TicketClerk(empId, empName, empSname); return(ticketClerk); } return(null); }
public void ShouldResultIn50OpenDoorsWithTwoPasses() { // arrange DoorMan doorMan = new DoorMan(); // act// assert doorMan.CountOpenDoors(2).Should().Be(50); }
public void ShouldOpenAllDoors() { // arrange DoorMan doorMan = new DoorMan(); // act// assert doorMan.CountOpenDoors(1).Should().Be(100); }
public void ShouldIterateDoors2Times() { //assign DoorMan doorMan = new DoorMan(); //act doorMan.WalkDoors(2); //assert doorMan.OpenDoorCount().Should().Be(50); }
public void ShouldIterateDoors1Time() { //assign DoorMan doorMan = new DoorMan(); //act doorMan.WalkDoors(1); //assert doorMan.OpenDoorCount().Should().Be(100); }
public void ShouldWalkList100Times() { // arrange DoorMan doorMan = new DoorMan(); // act // assert doorMan.OpenDoorCount(100).Should().Be(9); }
public void ShouldWalkListTwiceAndCloseHalfTheDoors() { // arrange DoorMan doorMan = new DoorMan(); // act // assert doorMan.OpenDoorCount(2).Should().Be(50); }
public void ShouldWalkListOnceAndOpenAllDoors() { // arrange DoorMan doorMan = new DoorMan(); // act // assert doorMan.OpenDoorCount(1).Should().Be(100); }