コード例 #1
0
 public MessageKeysBySubscription(string connectionString, IEntityById entityById, IMessageKeysByTopic messageByTopic, IMessageKeysByGroup messageByGroup)
     : base(connectionString)
 {
     this.entityById = entityById;
     this.messageByTopic = messageByTopic;
     this.messageByGroup = messageByGroup;
 }
コード例 #2
0
 public DeleteRetryCommand(
     IEntityById entityById,
     IRepository<Retry> repository)
 {
     this.entityById = entityById;
     this.repository = repository;
 }
コード例 #3
0
 public MessageKeysBySubscription(string connectionString, IEntityById entityById, IMessageKeysByTopic messageByTopic, IMessageKeysByGroup messageByGroup)
     : base(connectionString)
 {
     this.entityById     = entityById;
     this.messageByTopic = messageByTopic;
     this.messageByGroup = messageByGroup;
 }
コード例 #4
0
 public DeleteTopicCommand(
     IEntityById entityById,
     IRepository<Topic> repository)
 {
     this.entityById = entityById;
     this.repository = repository;
 }
コード例 #5
0
 public IDeleteTopicCommand CreateCommand(IEntityById queryEntityById = null, 
     IRepository<Topic> cud = null)
 {
     return new DeleteTopicCommand(
                         queryEntityById ?? Mock.Of<IEntityById>(),
                         cud ?? Mock.Of<IRepository<Topic>>());
 }
コード例 #6
0
ファイル: DeleteTopicCommand.cs プロジェクト: ashic/Hermes
 public DeleteTopicCommand(
     IEntityById entityById,
     IRepository <Topic> repository)
 {
     this.entityById = entityById;
     this.repository = repository;
 }
コード例 #7
0
 public UpdateRetryCommand(
     IEntityById entityById,
     IRepository <Retry> repository)
 {
     this.entityById = entityById;
     this.repository = repository;
 }
コード例 #8
0
 public IDeleteTopicCommand CreateCommand(IEntityById queryEntityById = null,
                                          IRepository <Topic> cud     = null)
 {
     return(new DeleteTopicCommand(
                queryEntityById ?? Mock.Of <IEntityById>(),
                cud ?? Mock.Of <IRepository <Topic> >()));
 }
コード例 #9
0
 public CreateSubscriptionCommand(
     IQueryValidator queryValidator,
     IEntityById entityById,
     IRepository<Subscription> repository)
 {
     this.queryValidator = queryValidator;
     this.entityById = entityById;
     this.repository = repository;
 }
コード例 #10
0
 private static ICreateGroupCommand CreateCreateGroupCommand(
     IExistsGroupByGroupName existGroupByGroupName = null,
     IEntityById entityById = null,
     IRepository<Group> cudGroup = null)
 {
     return new CreateGroupCommand(existGroupByGroupName ?? Mock.Of<IExistsGroupByGroupName>(),
                                 entityById ?? Mock.Of<IEntityById>(),
                                 cudGroup ?? Mock.Of<IRepository<Group>>());
 }
コード例 #11
0
 public CreateSubscriptionCommand(
     IQueryValidator queryValidator,
     IEntityById entityById,
     IRepository <Subscription> repository)
 {
     this.queryValidator = queryValidator;
     this.entityById     = entityById;
     this.repository     = repository;
 }
コード例 #12
0
 public CreateGroupCommand(
     IExistsGroupByGroupName existGroupByGroupName,
     IEntityById entityById,
     IRepository <Group> repository)
 {
     this.existGroupByGroupName = existGroupByGroupName;
     this.entityById            = entityById;
     this.repository            = repository;
 }
コード例 #13
0
 private static ICreateGroupCommand CreateCreateGroupCommand(
     IExistsGroupByGroupName existGroupByGroupName = null,
     IEntityById entityById       = null,
     IRepository <Group> cudGroup = null)
 {
     return(new CreateGroupCommand(existGroupByGroupName ?? Mock.Of <IExistsGroupByGroupName>(),
                                   entityById ?? Mock.Of <IEntityById>(),
                                   cudGroup ?? Mock.Of <IRepository <Group> >()));
 }
コード例 #14
0
ファイル: FeedResource.cs プロジェクト: jasondentler/Hermes
 public FeedResource(
     IGetWorkingFeedForTopic getWorkingFeedForTopic,
     IEntityById entityById,
     IMessageByMessageKey messageByMessageKey)
 {
     this.getWorkingFeedForTopic = getWorkingFeedForTopic;
     this.entityById = entityById;
     this.messageByMessageKey = messageByMessageKey;
 }
コード例 #15
0
 public SubscriptionResource(
     IUpdateSubscriptionCommand updateCommand,
     IDeleteSubscriptionCommand deleteCommand,
     IEntityById entityById)
 {
     this.updateCommand = updateCommand;
     this.deleteCommand = deleteCommand;
     this.entityById    = entityById;
 }
コード例 #16
0
ファイル: SubscriptionResource.cs プロジェクト: ashic/Hermes
 public SubscriptionResource(
     IUpdateSubscriptionCommand updateCommand,
     IDeleteSubscriptionCommand deleteCommand,
     IEntityById entityById)
 {
     this.updateCommand = updateCommand;
     this.deleteCommand = deleteCommand;
     this.entityById = entityById;
 }
コード例 #17
0
ファイル: CreateTopicCommand.cs プロジェクト: larsw/Hermes
 public CreateTopicCommand(
     IExistsTopicByName existsTopicByName,
     IEntityById entityById,
     IRepository<Topic> repository)
 {
     this.entityById = entityById;
     this.existsTopicByName = existsTopicByName;
     this.repository = repository;
 }
コード例 #18
0
ファイル: CreateTopicCommand.cs プロジェクト: ashic/Hermes
 public CreateTopicCommand(
     IExistsTopicByName existsTopicByName,
     IEntityById entityById,
     IRepository <Topic> repository)
 {
     this.entityById        = entityById;
     this.existsTopicByName = existsTopicByName;
     this.repository        = repository;
 }
コード例 #19
0
ファイル: CreateGroupCommand.cs プロジェクト: ashic/Hermes
 public CreateGroupCommand(
     IExistsGroupByGroupName existGroupByGroupName,
     IEntityById entityById,
     IRepository<Group> repository)
 {
     this.existGroupByGroupName = existGroupByGroupName;
     this.entityById = entityById;
     this.repository = repository;
 }
コード例 #20
0
 public CreateMessageCommand(
     IEntityById entityById,
     IMessageRepository repository,
     IEventAggregator eventAggregator)
 {
     this.entityById = entityById;
     this.repository = repository;
     this.eventAggregator = eventAggregator;
 }
コード例 #21
0
 private static IUpdateTopicCommand CreateUpdateTopicCommand(
     IExistsTopicByName existsTopicByName = null,
     IEntityById entityById       = null,
     IRepository <Topic> cudTopic = null)
 {
     return(new UpdateTopicCommand(existsTopicByName ?? Mock.Of <IExistsTopicByName>(),
                                   entityById ?? Mock.Of <IEntityById>(),
                                   cudTopic ?? Mock.Of <IRepository <Topic> >()));
 }
コード例 #22
0
ファイル: FeedResource.cs プロジェクト: ashic/Hermes
 public FeedResource(
     IGetWorkingFeedForTopic getWorkingFeedForTopic,
     IEntityById entityById,
     IMessageByMessageKey messageByMessageKey)
 {
     this.getWorkingFeedForTopic = getWorkingFeedForTopic;
     this.entityById             = entityById;
     this.messageByMessageKey    = messageByMessageKey;
 }
コード例 #23
0
 public CreateMessageCommand(
     IEntityById entityById,
     IMessageRepository repository,
     IEventAggregator eventAggregator)
 {
     this.entityById      = entityById;
     this.repository      = repository;
     this.eventAggregator = eventAggregator;
 }
コード例 #24
0
 public CreateSubscriptionCommand CreateCommand(
     IQueryValidator isQueryValid          = null,
     IEntityById entityById                = null,
     IRepository <Subscription> repository = null)
 {
     return(new CreateSubscriptionCommand(
                isQueryValid ?? Mock.Of <IQueryValidator>(qv => qv.IsValid(It.IsAny <string>())),
                entityById ?? Mock.Of <IEntityById>(eb => eb.Exist <Topic>(It.IsAny <Identity>())),
                repository ?? Mock.Of <IRepository <Subscription> >()));
 }
コード例 #25
0
ファイル: TopicResource.cs プロジェクト: ashic/Hermes
 public TopicResource(IEntityById entityById,
                      IUpdateTopicCommand updateGroupCommand,
                      IDeleteTopicCommand deleteGroupCommand,
                      ITopicByName topicByName)
 {
     this.entityById         = entityById;
     this.updateGroupCommand = updateGroupCommand;
     this.deleteGroupCommand = deleteGroupCommand;
     this.topicByName        = topicByName;
 }
コード例 #26
0
 private MessageKeysBySubscription CreateQuery(
     IEntityById entityById = null,
     IMessageKeysByGroup messageKeysByGroup = null,
     IMessageKeysByTopic messageKeysByTopic = null)
 {
     return(new MessageKeysBySubscription(base.connectionString,
                                          entityById ?? Mock.Of <IEntityById>(),
                                          messageKeysByTopic ?? Mock.Of <IMessageKeysByTopic>(),
                                          messageKeysByGroup ?? Mock.Of <IMessageKeysByGroup>()));
 }
コード例 #27
0
 private MessageKeysBySubscription CreateQuery(
     IEntityById entityById = null,
     IMessageKeysByGroup messageKeysByGroup = null,
     IMessageKeysByTopic messageKeysByTopic = null)
 {
     return new MessageKeysBySubscription(base.connectionString,
         entityById ?? Mock.Of<IEntityById>(),
         messageKeysByTopic ?? Mock.Of<IMessageKeysByTopic>(),
         messageKeysByGroup ?? Mock.Of<IMessageKeysByGroup>());
 }
コード例 #28
0
 public CreateSubscriptionCommand CreateCommand(
     IQueryValidator isQueryValid = null,
     IEntityById entityById = null,
     IRepository<Subscription> repository  = null)
 {
     return new CreateSubscriptionCommand(
         isQueryValid ?? Mock.Of<IQueryValidator>(qv => qv.IsValid(It.IsAny<string>())),
         entityById ?? Mock.Of<IEntityById>(eb => eb.Exist<Topic>(It.IsAny<Identity>())),
         repository ?? Mock.Of<IRepository<Subscription>>());
 }
コード例 #29
0
 private static ICreateMessageCommand CreateCreateMessageCommand(
     IEntityById entityById = null,
     IMessageRepository cudMessage = null,
     IEventAggregator eventAggregator = null)
 {
     return new CreateMessageCommand(
                                 entityById ?? Mock.Of<IEntityById>(),
                                 cudMessage ?? Mock.Of<IMessageRepository>(),
                                 eventAggregator ?? Mock.Of<IEventAggregator>()
                                 );
 }
コード例 #30
0
 public DeleteGroupCommand CreateCommand(IEntityById queryEntityById = null, 
     IRepository<Group> cudGroup = null,
     IChildGroupsOfGroup childGroupsOfGroup = null,
     ITopicsByGroup queryTopicsByGroup = null)
 {
     return new DeleteGroupCommand(
                         queryEntityById ?? Mock.Of<IEntityById>(),
                         cudGroup ?? Mock.Of<IRepository<Group>>(),
                         childGroupsOfGroup ?? Mock.Of<IChildGroupsOfGroup>(),
                         queryTopicsByGroup ?? Mock.Of<ITopicsByGroup>());
 }
コード例 #31
0
 public DeleteGroupCommand CreateCommand(IEntityById queryEntityById            = null,
                                         IRepository <Group> cudGroup           = null,
                                         IChildGroupsOfGroup childGroupsOfGroup = null,
                                         ITopicsByGroup queryTopicsByGroup      = null)
 {
     return(new DeleteGroupCommand(
                queryEntityById ?? Mock.Of <IEntityById>(),
                cudGroup ?? Mock.Of <IRepository <Group> >(),
                childGroupsOfGroup ?? Mock.Of <IChildGroupsOfGroup>(),
                queryTopicsByGroup ?? Mock.Of <ITopicsByGroup>()));
 }
コード例 #32
0
 public DeleteGroupCommand(
     IEntityById entityById,
     IRepository<Group> repository,
     IChildGroupsOfGroup childGroupsOfGroup,
     ITopicsByGroup topicsByGroup)
 {
     this.entityById = entityById;
     this.repository = repository;
     this.childGroupsOfGroup = childGroupsOfGroup;
     this.topicsByGroup = topicsByGroup;
 }
コード例 #33
0
ファイル: DeleteGroupCommand.cs プロジェクト: ashic/Hermes
 public DeleteGroupCommand(
     IEntityById entityById,
     IRepository <Group> repository,
     IChildGroupsOfGroup childGroupsOfGroup,
     ITopicsByGroup topicsByGroup)
 {
     this.entityById         = entityById;
     this.repository         = repository;
     this.childGroupsOfGroup = childGroupsOfGroup;
     this.topicsByGroup      = topicsByGroup;
 }
コード例 #34
0
 private static ICreateMessageCommand CreateCreateMessageCommand(
     IEntityById entityById           = null,
     IMessageRepository cudMessage    = null,
     IEventAggregator eventAggregator = null)
 {
     return(new CreateMessageCommand(
                entityById ?? Mock.Of <IEntityById>(),
                cudMessage ?? Mock.Of <IMessageRepository>(),
                eventAggregator ?? Mock.Of <IEventAggregator>()
                ));
 }
コード例 #35
0
ファイル: GroupResource.cs プロジェクト: ashic/Hermes
 public GroupResource(IEntityById entityById,
                      IUpdateGroupCommand updateGroupCommand,
                      IDeleteGroupCommand deleteGroupCommand,
                      ITopicsByGroup topicsByGroup,
                      IGroupByName groupByName)
 {
     this.entityById         = entityById;
     this.updateGroupCommand = updateGroupCommand;
     this.deleteGroupCommand = deleteGroupCommand;
     this.topicsByGroup      = topicsByGroup;
     this.groupByName        = groupByName;
 }
コード例 #36
0
 public UpdateSubscriptionCommand CreateCommand(
     IEntityById entityById = null,
     IQueryValidator queryValidator = null,
     IRepository<Subscription> repository = null
     )
 {
     return new UpdateSubscriptionCommand(
         entityById ?? Mock.Of<IEntityById>(eb => eb.Exist<Subscription>(It.IsAny<Identity>()) == true),
         queryValidator ?? Mock.Of<IQueryValidator>(qv => qv.IsValid(It.IsAny<string>()) == true),
         repository ?? Mock.Of<IRepository<Subscription>>()
         );
 }
コード例 #37
0
 public UpdateSubscriptionCommand CreateCommand(
     IEntityById entityById                = null,
     IQueryValidator queryValidator        = null,
     IRepository <Subscription> repository = null
     )
 {
     return(new UpdateSubscriptionCommand(
                entityById ?? Mock.Of <IEntityById>(eb => eb.Exist <Subscription>(It.IsAny <Identity>()) == true),
                queryValidator ?? Mock.Of <IQueryValidator>(qv => qv.IsValid(It.IsAny <string>()) == true),
                repository ?? Mock.Of <IRepository <Subscription> >()
                ));
 }
コード例 #38
0
ファイル: RetryService.cs プロジェクト: ashic/Hermes
 public RetryService(IEntityById entityById,
                     ICreateRetryCommand createRetryCommand,
                     IDeleteRetryCommand deleteRetryCommand,
                     IUpdateRetryCommand updateRetryCommand,
                     IGenericJsonPagedQuery genericJsonPagedQuery)
 {
     this.entityById            = entityById;
     this.createRetryCommand    = createRetryCommand;
     this.deleteRetryCommand    = deleteRetryCommand;
     this.updateRetryCommand    = updateRetryCommand;
     this.genericJsonPagedQuery = genericJsonPagedQuery;
 }
コード例 #39
0
ファイル: GroupResource.cs プロジェクト: jasondentler/Hermes
 public GroupResource(IEntityById entityById,
     IUpdateGroupCommand updateGroupCommand,
     IDeleteGroupCommand deleteGroupCommand,
     ITopicsByGroup topicsByGroup,
     IGroupByName groupByName)
 {
     this.entityById = entityById;
     this.updateGroupCommand = updateGroupCommand;
     this.deleteGroupCommand = deleteGroupCommand;
     this.topicsByGroup = topicsByGroup;
     this.groupByName = groupByName;
 }
コード例 #40
0
ファイル: GroupController.cs プロジェクト: ashic/Hermes
 public GroupController(
     IGenericJsonPagedQuery genericJsonPagedQuery,
     IEntityById entityById,
     ICreateGroupCommand createGroupCommand,
     IUpdateGroupCommand updateGroupCommand,
     IDeleteGroupCommand deleteGroupCommand
     )
 {
     this.genericJsonPagedQuery = genericJsonPagedQuery;
     this.entityById            = entityById;
     this.createGroupCommand    = createGroupCommand;
     this.updateGroupCommand    = updateGroupCommand;
     this.deleteGroupCommand    = deleteGroupCommand;
 }
コード例 #41
0
 public TopicController(
     IEntityById entityById,
     ITopicsSortedByName topicsSortedByName,
     IGroupsSortedByName groupsSortedByName,
     ICreateTopicCommand createTopicCommand,
     IUpdateTopicCommand updateTopicCommand,
     IDeleteTopicCommand deleteTopicCommand)
 {
     this.entityById = entityById;
     this.topicsSortedByName = topicsSortedByName;
     this.groupsSortedByName = groupsSortedByName;
     this.createTopicCommand = createTopicCommand;
     this.updateTopicCommand = updateTopicCommand;
     this.deleteTopicCommand = deleteTopicCommand;
 }
コード例 #42
0
ファイル: TopicController.cs プロジェクト: ashic/Hermes
 public TopicController(
     IEntityById entityById,
     ITopicsSortedByName topicsSortedByName,
     IGroupsSortedByName groupsSortedByName,
     ICreateTopicCommand createTopicCommand,
     IUpdateTopicCommand updateTopicCommand,
     IDeleteTopicCommand deleteTopicCommand)
 {
     this.entityById         = entityById;
     this.topicsSortedByName = topicsSortedByName;
     this.groupsSortedByName = groupsSortedByName;
     this.createTopicCommand = createTopicCommand;
     this.updateTopicCommand = updateTopicCommand;
     this.deleteTopicCommand = deleteTopicCommand;
 }
コード例 #43
0
ファイル: TopicControllerTests.cs プロジェクト: ashic/Hermes
        private static TopicController CreateController(
            ITopicsSortedByName topicsSortedByName = null,
            IEntityById entityById = null,
            IGroupsSortedByName groupsSortedByName = null,
            ICreateTopicCommand createTopicCommand = null,
            IUpdateTopicCommand updateTopicCommand = null,
            IDeleteTopicCommand deleteTopicCommand = null)

        {
            var defaultGroupQuery = Mock.Of <IGroupsSortedByName>(q => q.Execute() == new Group[] { SampleGroup });

            return(new TopicController(entityById ?? Mock.Of <IEntityById>(),
                                       topicsSortedByName ?? Mock.Of <ITopicsSortedByName>(),
                                       groupsSortedByName ?? defaultGroupQuery,
                                       createTopicCommand ?? Mock.Of <ICreateTopicCommand>(),
                                       updateTopicCommand ?? Mock.Of <IUpdateTopicCommand>(),
                                       deleteTopicCommand ?? Mock.Of <IDeleteTopicCommand>()
                                       ));
        }
コード例 #44
0
 public DeleteSubscriptionCommand(IEntityById entityById, IRepository <Subscription> repository)
 {
     this.entityById = entityById;
     this.repository = repository;
 }
コード例 #45
0
 private static TopicController CreateController(
     ITopicsSortedByName topicsSortedByName = null,
     IEntityById entityById = null,
     IGroupsSortedByName groupsSortedByName = null,
     ICreateTopicCommand createTopicCommand = null,
     IUpdateTopicCommand updateTopicCommand = null,
     IDeleteTopicCommand deleteTopicCommand = null)
 {
     var defaultGroupQuery = Mock.Of<IGroupsSortedByName>(q => q.Execute() == new Group[]{SampleGroup});
     return new TopicController( entityById ?? Mock.Of<IEntityById>(),
                                 topicsSortedByName ?? Mock.Of<ITopicsSortedByName>(),
                                 groupsSortedByName ?? defaultGroupQuery,
                                 createTopicCommand ?? Mock.Of<ICreateTopicCommand>(),
                                 updateTopicCommand ?? Mock.Of<IUpdateTopicCommand>(),
                                 deleteTopicCommand ?? Mock.Of<IDeleteTopicCommand>()
                                 );
 }
コード例 #46
0
 public DeleteSubscriptionCommand(IEntityById entityById, IRepository<Subscription> repository)
 {
     this.entityById = entityById;
     this.repository = repository;
 }
コード例 #47
0
 private static ICreateTopicCommand CreateCreateTopicCommand(
     IExistsTopicByName existsTopicByName = null,
     IEntityById entityById = null,
     IRepository<Topic> cudTopic = null)
 {
     return new CreateTopicCommand(existsTopicByName ?? Mock.Of<IExistsTopicByName>(),
                                 entityById ?? Mock.Of<IEntityById>(),
                                 cudTopic ?? Mock.Of<IRepository<Topic>>());
 }