Ejemplo n.º 1
0
        public Nursery(INurseryAbstractFactory factory, IMediator mediator)
        {
            _antTypeGetter = factory.BuildAntTypeGetter();
            _typeCreator   = factory.BuildAntTypeCreator();

            _mediator = mediator;
        }
Ejemplo n.º 2
0
        public NurseryTests()
        {
            _incubator   = Substitute.For <IIncubator>();
            _typeCreator = Substitute.For <IAntTypeCreator>();
            _typeGetter  = Substitute.For <IAntTypeGetter>();
            _mediator    = Substitute.For <IMediator>();

            _factory = Substitute.For <INurseryAbstractFactory>();
            _factory.BuildAntTypeCreator().Returns(_typeCreator);
            _factory.BuildAntTypeGetter().Returns(_typeGetter);
            _factory.BuildIncubator().Returns(_incubator);

            _nursery = new Core.Nursery(_factory, _mediator);
        }
Ejemplo n.º 3
0
 public DefaultAntTypeGetterTests()
 {
     _repository = Substitute.For <IAntTypeRepository>();
     _getter     = new DefaultAntTypeGetter(_repository);
 }