Esempio n. 1
0
        public AllTodosQueryHandlerTests()
        {
            this.rpcPermissionsMock = new RpcClientMock <PermissionsService.PermissionsServiceClient>();
            var configuration = new MapperConfiguration(cfg =>
            {
                cfg.AddProfile <AutoMapperProfile>();
            });

            this.mapper = new Mapper(configuration);
        }
Esempio n. 2
0
        public DeleteTodoCommandHandlerTests()
        {
            this.rpcPermissionsMock   = new RpcClientMock <PermissionsService.PermissionsServiceClient>();
            this.rpcNotificationsMock = new RpcClientMock <NotificationService.NotificationServiceClient>();

            var rpcResponse = new IsUserAllowedResponse {
                IsAllowed = true
            };

            this.rpcPermissionsMock.ClientMock.Setup(x => x.IsUserAllowed(It.IsAny <IsUserAllowedRequest>(), It.IsAny <CallOptions>())).Returns(rpcResponse);
        }
        public CreateTodoCommandHandlerTests()
        {
            this.rpcPermissionsMock   = new RpcClientMock <PermissionsService.PermissionsServiceClient>();
            this.rpcNotificationsMock = new RpcClientMock <NotificationService.NotificationServiceClient>();
            var configuration = new MapperConfiguration(cfg =>
            {
                cfg.AddProfile <AutoMapperProfile>();
            });

            this.mapper = new Mapper(configuration);

            var rpcResponse = new IsUserAllowedResponse {
                IsAllowed = true
            };

            this.rpcPermissionsMock.ClientMock.Setup(x => x.IsUserAllowed(It.IsAny <IsUserAllowedRequest>(), It.IsAny <CallOptions>())).Returns(rpcResponse);
        }