public void SetUp() { var snapshotDefinitionService = new SnapshotDefinitionService(Mock <ILog>()); snapshotDefinitionService.Load(typeof(ThingySnapshotV1), typeof(ThingySnapshotV2), typeof(ThingySnapshot)); Inject <ISnapshotDefinitionService>(snapshotDefinitionService); }
public void SetUp() { var snapshotDefinitionService = new SnapshotDefinitionService( Logger <SnapshotDefinitionService>(), Mock <ILoadedVersionedTypes>()); snapshotDefinitionService.Load(typeof(ThingySnapshotV1), typeof(ThingySnapshotV2), typeof(ThingySnapshot)); Inject <ISnapshotDefinitionService>(snapshotDefinitionService); }
public void SetUp() { _resolverMock = InjectMock <IResolver>(); _resolverMock .Setup(r => r.Resolve(typeof(ISnapshotUpgrader <ThingySnapshotV1, ThingySnapshotV2>))) .Returns(() => new ThingySnapshotV1ToV2Upgrader()); _resolverMock .Setup(r => r.Resolve(typeof(ISnapshotUpgrader <ThingySnapshotV2, ThingySnapshot>))) .Returns(() => new ThingySnapshotV2ToV3Upgrader()); var snapshotDefinitionService = new SnapshotDefinitionService(Mock <ILog>()); snapshotDefinitionService.Load(typeof(ThingySnapshotV1), typeof(ThingySnapshotV2), typeof(ThingySnapshot)); Inject <ISnapshotDefinitionService>(snapshotDefinitionService); }
public void SetUp() { _serviceProviderMock = InjectMock <IServiceProvider>(); _serviceProviderMock .Setup(r => r.GetService(typeof(ISnapshotUpgrader <ThingySnapshotV1, ThingySnapshotV2>))) .Returns(() => new ThingySnapshotV1ToV2Upgrader()); _serviceProviderMock .Setup(r => r.GetService(typeof(ISnapshotUpgrader <ThingySnapshotV2, ThingySnapshot>))) .Returns(() => new ThingySnapshotV2ToV3Upgrader()); var snapshotDefinitionService = new SnapshotDefinitionService( Logger <SnapshotDefinitionService>(), Mock <ILoadedVersionedTypes>()); snapshotDefinitionService.Load(typeof(ThingySnapshotV1), typeof(ThingySnapshotV2), typeof(ThingySnapshot)); Inject <ISnapshotDefinitionService>(snapshotDefinitionService); }