public void CreateCommandExecutor_HasType_RepositoryCreated()
        {
            var applicationContextProvider = GetApplicationContextProvider();

            var sessionManagerProvider = GetSessionManagerProvider(new Mock <ISession>());

            var entityFactoryService = new EntityFactoryService(sessionManagerProvider.Object, new Mock <ISessionFactoryManager>().Object,
                                                                applicationContextProvider.Object);

            var executor = entityFactoryService.CreateCommandExecutor <TestCommand>();

            Assert.Pass();
        }
        public void CreateCommandExecutor_NoHasType_Exception()
        {
            const string message = "No nick for the command";

            var applicationContextProvider = new Mock <IApplicationContextProvider>();

            applicationContextProvider.Setup(x => x.GetNickForCommand(It.IsAny <Type>()))
            .Throws(new ArgumentException(message));

            var sessionManagerProvider = GetSessionManagerProvider(new Mock <ISession>());

            var entityFactoryService = new EntityFactoryService(sessionManagerProvider.Object, new Mock <ISessionFactoryManager>().Object,
                                                                applicationContextProvider.Object);

            Assert.Throws <ArgumentException>(() => entityFactoryService.CreateCommandExecutor <TestCommand>(), message);
        }