LCOV - code coverage report
Current view: top level - Cqrs.Tests/Snapshots - When_getting_an_aggregate_with_snapshot.cs Hit Total Coverage
Test: doc-coverage.info Lines: 0 3 0.0 %
Date: 2017-07-26

          Line data    Source code
       1             : using System;
       2             : using cdmdotnet.Logging;
       3             : using Cqrs.Domain;
       4             : using Cqrs.Domain.Factories;
       5             : using Cqrs.Authentication;
       6             : using Cqrs.Snapshots;
       7             : using Cqrs.Tests.Substitutes;
       8             : using NUnit.Framework;
       9             : 
      10             : namespace Cqrs.Tests.Snapshots
      11             : {
      12             :         [TestFixture]
      13             :         public class When_getting_an_aggregate_with_snapshot
      14           0 :         {
      15             :                 private TestSnapshotAggregate _aggregate;
      16             : 
      17             :                 [SetUp]
      18           0 :                 public void Setup()
      19             :                 {
      20             :                         var eventStore = new TestInMemoryEventStore();
      21             :                         var eventPublisher = new TestEventPublisher();
      22             :                         var snapshotStore = new TestSnapshotStore();
      23             :                         var snapshotStrategy = new DefaultSnapshotStrategy<ISingleSignOnToken>();
      24             :                         var dependencyResolver = new TestDependencyResolver(null);
      25             :                         var aggregateFactory = new AggregateFactory(dependencyResolver, dependencyResolver.Resolve<ILogger>());
      26             :                         var snapshotRepository = new SnapshotRepository<ISingleSignOnToken>(snapshotStore, snapshotStrategy, new Repository<ISingleSignOnToken>(aggregateFactory, eventStore, eventPublisher, new NullCorrelationIdHelper()), eventStore, aggregateFactory);
      27             :                         var session = new UnitOfWork<ISingleSignOnToken>(snapshotRepository);
      28             : 
      29             :                         _aggregate = session.Get<TestSnapshotAggregate>(Guid.NewGuid());
      30             :                 }
      31             : 
      32             :                 [Test]
      33           0 :                 public void Should_restore()
      34             :                 {
      35             :                         Assert.True(_aggregate.Restored);
      36             :                 }
      37             :         }
      38             : }

Generated by: LCOV version 1.10