public override void PublishesSolutionSyncing() { Assert.That( () => this.publisher.PublishSolutionSyncing(), Does.RaiseWith <ISolutionSyncStatus>(_ => this.publisher.SolutionSyncing += _) .WithArgWhere(status => status.AbortSync, Is.False)); }
public override void PublishesCsprojGenerated() { var fileArg = new GeneratedFile(new FileInfo(this.testArgs.CsprojPath), this.testArgs.CsprojContent); Assert.That( () => this.publisher.PublishCsprojGenerated(this.testArgs.CsprojPath, this.testArgs.CsprojContent), Does.RaiseWith <IGeneratedFile>(_ => this.publisher.CsprojGenerated += _) .WithArgThat(Is.EqualTo(fileArg).Using(new GeneratedFileEqualityComparer()))); }
public void PublishSlnGeneratedReturnsModifiedContent() { string returnedContent = null; Assume.That( () => returnedContent = this.publisher.PublishSlnGenerated( this.testArgs.SlnPath, this.testArgs.SlnContent), Does.RaiseWith <IGeneratedFile>(_ => this.publisher.SlnGenerated += _ + ModifyContent)); Assert.That(returnedContent, Is.EqualTo(SomeModifiedContent)); }
public void PublishSolutionSyncingReturnsUpdatedStatus() { bool returnedAbortStatus = false; void AbortSync(ISolutionSyncStatus status) => status.AbortSync = true; Assume.That( () => returnedAbortStatus = this.publisher.PublishSolutionSyncing(), Does.RaiseWith <ISolutionSyncStatus>(_ => this.publisher.SolutionSyncing += _ + AbortSync)); Assert.That(returnedAbortStatus, Is.True); }
public override void PublishesSolutionSynced() { Assert.That( () => this.publisher.PublishSolutionSynced(), Does.Raise(_ => this.publisher.SolutionSynced += _)); }