public DefaultDomainObjectRepositoryTests() { domainObject = new MyDomainObject(aggregateId, 123); streamNameResolver.Setup(x => x.GetStreamName(It.IsAny <Type>(), aggregateId)).Returns(streamName); factory.Setup(x => x.CreateNew(typeof(MyDomainObject), aggregateId)).Returns(domainObject); sut = new DefaultDomainObjectRepository(factory.Object, eventStore.Object, streamNameResolver.Object, eventDataFormatter.Object); }
public DefaultDomainObjectRepositoryTests() { domainObject = new MyDomainObject(aggregateId, 123); A.CallTo(() => nameResolver.GetStreamName(A <Type> .Ignored, aggregateId)) .Returns(streamName); A.CallTo(() => factory.CreateNew <MyDomainObject>(aggregateId)) .Returns(domainObject); sut = new DefaultDomainObjectRepository(eventStore, nameResolver, formatter); }