public Nursery(INurseryAbstractFactory factory, IMediator mediator)
        {
            _antTypeGetter = factory.BuildAntTypeGetter();
            _typeCreator   = factory.BuildAntTypeCreator();

            _mediator = mediator;
        }
Esempio 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);
        }
Esempio n. 3
0
 public AntTypeCreationTests()
 {
     _repository = Substitute.For <IAntTypeRepository>();
     _creator    = new DefaultAntTypeCreator(_repository);
 }