/// <summary>
        /// Initialised when user logs in
        /// I probably would have created a container module for this
        /// </summary>
        public static UserSessionState Initialise(User user, IRepository <User, UserPet> userRepository,
                                                  IRepository <Pet, PetMetric> petRepository, IRepository <Animal, AnimalMetric> animalRepository,
                                                  IRepository <Interaction, MetricInteraction> interactionRepository, IConfiguration config,
                                                  UserSessionBuilder userSessionBuilder, IContainer container)
        {
            //Validator
            var petRegistrationValidator =
                new PetRegistrationValidator(animalRepository, petRepository, userRepository);

            var petCareActionValidator =
                new PetCareActionValidator(petRepository, interactionRepository);
            var validator = new UserSessionRequestValidator(user, userRepository, petRepository,
                                                            petRegistrationValidator, petCareActionValidator);

            //Persisters
            var petPersister       = container.RecordPersister <Pet>();
            var userPetPersister   = container.RecordPersister <UserPet>();
            var petMetricPersister = container.RecordPersister <PetMetric>();

            //Processor
            var sessionRequestProcessor = new SessionRequestProcessor(user, userRepository, petRepository,
                                                                      interactionRepository, petPersister, userPetPersister,
                                                                      petMetricPersister, userSessionBuilder);

            return(new UserSessionState(user, userRepository, petRepository, validator, sessionRequestProcessor));
        }
        public void SetUp()
        {
            _mockUserRepository           = new Mock <IRepository <User, UserPet> >();
            _mockPetRepository            = new Mock <IRepository <Pet, PetMetric> >();
            _mockPetRegistrationValidator = new Mock <IUserSessionRequestDataValidator <NopePet> >();
            _mockPetCareActionValidator   = new Mock <IUserSessionRequestDataValidator <UserPetCareAction> >();
            _testUser = TestData.Users.MeJulie;

            _sut = new UserSessionRequestValidator(_testUser, _mockUserRepository.Object, _mockPetRepository.Object,
                                                   _mockPetRegistrationValidator.Object, _mockPetCareActionValidator.Object);
        }