Esempio n. 1
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);
        }
        public void should_build_an_incubator()
        {
            var incubator = _factory.BuildIncubator();

            _incubatorFactory.Received(1).Build();
        }