Пример #1
0
        public ThingContextFactoryTest()
        {
            _response = Substitute.For <IThingResponseBuilder>();
            _event    = Substitute.For <IEventBuilder>();
            _property = Substitute.For <IPropertyBuilder>();
            _action   = Substitute.For <IActionBuilder>();

            _factory = new ThingContextFactory(_event, _property, _response, _action);

            _event
            .Build()
            .Returns(new Dictionary <string, EventCollection>());

            _response
            .Build()
            .Returns(new Dictionary <string, object>());

            _action
            .Build()
            .Returns(new Dictionary <string, ActionCollection>());

            _property
            .Build()
            .Returns(new Dictionary <string, IThingProperty>());
        }
Пример #2
0
 /// <summary>
 /// Initialize a new instance of <see cref="IEventBuilder"/>.
 /// </summary>
 /// <param name="event"></param>
 /// <param name="property"></param>
 /// <param name="response"></param>
 /// <param name="action"></param>
 public ThingContextFactory(IEventBuilder @event, IPropertyBuilder property,
                            IThingResponseBuilder response, IActionBuilder action)
 {
     _event    = @event;
     _property = property;
     _response = response;
     _action   = action;
 }