Пример #1
0
        public void Constructor_AllParametersAreSet_ObjectIsInstantiated()
        {
            // Arrange
            var agentControlDefinitionProvider = new Mock <IAgentControlDefinitionProvider>();

            // Act
            var agentCoordinationServiceFactory = new AgentCoordinationServiceFactory(agentControlDefinitionProvider.Object);

            // Assert
            Assert.IsNotNull(agentCoordinationServiceFactory);
        }
Пример #2
0
        public void GetAgentCoordinationService_ResumeCallbackIsNull_ArgumentNullExceptionIsThrown()
        {
            // Arrange
            Action pauseCallback  = () => { };
            Action resumeCallback = null;

            var agentConfigurationProvider      = new Mock <IAgentControlDefinitionProvider>();
            var agentCoordinationServiceFactory = new AgentCoordinationServiceFactory(agentConfigurationProvider.Object);

            // Act
            agentCoordinationServiceFactory.GetAgentCoordinationService(pauseCallback, resumeCallback);
        }
        public void GetAgentCoordinationService_CallbacksAreSet_ResultIsNotNull()
        {
            // Arrange
            Action pauseCallback  = () => { };
            Action resumeCallback = () => { };

            var agentControlDefinitionProvider  = new Mock <IAgentControlDefinitionProvider>();
            var agentCoordinationServiceFactory = new AgentCoordinationServiceFactory(agentControlDefinitionProvider.Object);

            // Act
            var result = agentCoordinationServiceFactory.GetAgentCoordinationService(pauseCallback, resumeCallback);

            // Assert
            Assert.IsNotNull(result);
        }