public void ShouldCreateMissingSynchronizationEntriesInSlave()
        {
            using (Mocks.Record())
            {
                SetupResult.For(_masterStub.GetAll()).Return(new[] { Entry("1", "scheduled") });

                Expect.Call(_slaveMock.GetAll()).Return(new SynchronizationEntry[0]);
                _slaveMock.Create(Entry("1", "planned"));
            }
            using (Mocks.Playback())
            {
                _synchronizer.Synchronize();
            }
        }
Esempio n. 2
0
        private void SynchronizeExistence(SynchronizationMap statusMap)
        {
            var creationSynchronizer = new CreationSynchronizer(statusMap, _eManagerAgent, _whiskWorkAgent);

            Console.WriteLine("Synchronizing existence (eManager->whiteboard)");

            creationSynchronizer.Synchronize();
        }
        public void ShouldIgnoreMissingMappingWhenSynchronizingCreation()
        {
            var map          = new SynchronizationMap(_masterStub, _slaveMock);
            var synchronizer = new CreationSynchronizer(map, _masterStub, _slaveMock);

            using (Mocks.Record())
            {
                SetupResult.For(_masterStub.GetAll()).Return(new[] { Entry("1", "notMapped") });
                Expect.Call(_slaveMock.GetAll()).Return(new SynchronizationEntry[0]);
            }
            using (Mocks.Playback())
            {
                synchronizer.Synchronize();
            }
        }