Esempio n. 1
0
 internal Operation(string name, OperationDisplay display, string origin, OperationProperties properties)
 {
     Name       = name;
     Display    = display;
     Origin     = origin;
     Properties = properties;
 }
Esempio n. 2
0
        public void Setup()
        {
            _processor = new OperationProcessor();
            _processor.LoggingService = new Mock <ILoggingService>().Object;
            var schedule = new Mock <ISchedule>();

            _processor.Start(schedule.Object);
            var operationScheduleMock = new Mock <OperationScheduleBase>();
            var propertiesMock        = new OperationProperties(operationScheduleMock.Object);
            var protocolMock          = new Mock <IProtocol>();
            var operationMock         = new Operation(protocolMock.Object, propertiesMock, 1); //TODO: Operation is dependent of protocol - wrong architecture

            _operation = operationMock;
        }
        private OperationProperties FillOperationsProperties(TargetData destinationTarget, ServerData destinationServer,
                                                             ScheduleData schedule, TargetData sourceTarget, ServerData sourceServer, WatcherData watcher,
                                                             ProcedureData dbData)
        {
            var operationProperties = new OperationProperties(OperationScheduleFactory.GetSchedule(schedule))
            {
                DestinationTarget =
                    new TargetTransformData(destinationServer.Ip, destinationTarget.Path, destinationServer.User,
                                            destinationServer.Password),
                SourceTarget =
                    new TargetTransformData(sourceServer.Ip, sourceTarget.Path, sourceServer.User, sourceServer.Password),
                Regex = watcher.FileNameRegex,
            };

            if (dbData != null)
            {
                operationProperties.ProcedureData = dbData;
            }
            return(operationProperties);
        }