public void SetUp()
 {
     topicRepo = Substitute.For<TopicCommandRepository>();
     var productRepository = Substitute.For<ProductRepository>();
     collisionDetector = Substitute.For<VersionRangeCollisionDetector>(productRepository);
     topicService = new TopicService(topicRepo, collisionDetector);
     anyVersionRange = new VersionRange(fromVersion: anyVersion, toVersion: anyVersion);
     anyProductId = "AnyProductId";
 }
Exemple #2
0
 public TopicService(TopicCommandRepository topicRepo, VersionRangeCollisionDetector collisionDetector)
 {
     this.collisionDetector = collisionDetector;
     TopicRepository = topicRepo;
 }
 public void SetUp()
 {
     productRepository = Substitute.For<ProductRepository>();
     versionRangeCollisionDetector = new VersionRangeCollisionDetector(productRepository);
     productRepository.GetAllVersionsFor(ProductId).Returns(Task.FromResult(productVersionsFrom1To5));
 }