public void EnsureClone_ProjectThatHasNeverBeenCloned_RunsInitialClone()
        {
            // Setup
            var projectDir = Path.Combine(_env.Settings.WebWorkDirectory, _projectCode);

            Directory.CreateDirectory(projectDir);
            var lfProject = LanguageForgeProject.Create(_projectCode);
            var action    = new EnsureCloneActionDoubleMockingInitialTransfer(_env.Settings, _env.Logger, _mongoProjectRecordFactory, _mongoConnection);

            Assert.That(action.InitialCloneWasRun, Is.False);

            // Execute
            action.Run(lfProject);

            // Verify
            Assert.That(action.InitialCloneWasRun, Is.True);
        }
        public void EnsureClone_ProjectThatHasAPreviouslyClonedDate_DoesNotRunInitialClone()
        {
            // Setup
            var projectDir = Path.Combine(_env.Settings.WebWorkDirectory, _projectCode);

            Directory.CreateDirectory(projectDir);
            var lfProject = LanguageForgeProject.Create(_projectCode);

            _mongoConnection.SetLastSyncedDate(lfProject, DateTime.UtcNow);
            var action = new EnsureCloneActionDoubleMockingInitialTransfer(_env.Settings, _env.Logger, _mongoProjectRecordFactory, _mongoConnection);

            Assert.That(action.InitialCloneWasRun, Is.False);

            // Execute
            action.Run(lfProject);

            // Verify
            Assert.That(action.InitialCloneWasRun, Is.False);
        }
        public void EnsureClone_ProjectThatHasPreviousUserData_DoesNotRunInitialClone()
        {
            // Setup
            var projectDir = Path.Combine(_env.Settings.WebWorkDirectory, _projectCode);

            Directory.CreateDirectory(projectDir);
            var lfProject = LanguageForgeProject.Create(_projectCode);
            var data      = new SampleData();

            _mongoConnection.UpdateMockLfLexEntry(data.bsonTestData);
            var action = new EnsureCloneActionDoubleMockingInitialTransfer(_env.Settings, _env.Logger, _mongoProjectRecordFactory, _mongoConnection);

            Assert.That(action.InitialCloneWasRun, Is.False);

            // Execute
            action.Run(lfProject);

            // Verify
            Assert.That(action.InitialCloneWasRun, Is.False);
        }