public RouteCommandHandlerTests()
 {
     _mediator             = new Mock <IMediator>();
     _pointRepository      = new Mock <IPointRepository>();
     _connectionRepository = new Mock <IConnectionRepository>();
     _routeRepository      = new Mock <IRouteRepository>();
     _handler = new RouteCommandHandler(_pointRepository.Object, _routeRepository.Object, _connectionRepository.Object, _mediator.Object);
     _point   = new Faker <Point>()
                .CustomInstantiator(f => new Point("A"))
                .RuleFor(p => p.Id, ObjectId.Parse("5d61646c1c86f4ef738e5e90"))
                .RuleFor(p => p.Active, true)
                .RuleFor(p => p.CreatedAt, DateTime.UtcNow)
                .RuleFor(p => p.UpdatedAt, DateTime.UtcNow)
                .Generate();
 }
示例#2
0
        public void Init()
        {
            _routeRepository = Substitute.For <IRouteRepository>();

            _commandHandler = new RouteCommandHandler(_routeRepository);
        }