public bool WhoSuspect(ResponseType response, ResponseType responseRigth, TheoryService theoryService, Witness witness, Theory theory)
        {
            if (response == responseRigth)
            {
                Theory newTheory = theoryService.NextTheory(false, true, true);

                ResponseType newResponse = witness.Reply(newTheory);

                if (WhoSuspect(newResponse, response, theoryService, witness, theory))
                    theory.Suspect = newTheory.Suspect;

                return false;
            }

            return true;
        }
        private bool WhoGun(ResponseType response, ResponseType responseRigth, TheoryService theoryService, Witness witness, Theory theory)
        {
            if (response == responseRigth)
            {
                Theory newTheory = theoryService.NextTheory(true, true, false);

                ResponseType newResponse = witness.Reply(newTheory);

                if (WhoGun(newResponse, response, theoryService, witness, theory))
                    theory.Gun = newTheory.Gun;

                return false;
            }

            return true;
        }
        public TheoryTests()
        {
            this.mockContext = new Mock<IDataContext>();
            this.mockContext.Setup(m => m.Locals).Returns(new List<string>() { "Local 1", "Local 2", "Local 3" });
            this.mockContext.Setup(m => m.Guns).Returns(new List<string>() { "Arma 1", "Arma 2" });
            this.mockContext.Setup(m => m.Suspects).Returns(new List<string>() { "Suspeito 1", "Suspeito 2", "Suspeito 3", "Suspeito 4" });

            this.caso = new Case()
            {
                Title = "Teste",
                Guns = mockContext.Object.Guns,
                Locals = mockContext.Object.Locals,
                Suspects = mockContext.Object.Suspects,
            };

            this.servicoDeTeoria = new TheoryService(this.caso);
        }
 public InterrogationService(Witness witness, Case caseForInterrogation)
 {
     this.witness = witness;
     this.theoryService = new TheoryService(caseForInterrogation);
 }