public void EndProjectUpdate_WithValidProjectName_FiresProjectUpdateEvent() { var restoreProgressEvents = new VsRestoreProgressEvents(); var expectedProjectName = "projectName.csproj"; var expectedFileListName = new List <string>() { "project.assets.json" }; string actualProjectName = null; IReadOnlyList <string> actualFileListName = null; restoreProgressEvents.ProjectUpdateFinished += (projectUniqueName, updatedFiles) => { actualProjectName = projectUniqueName; actualFileListName = updatedFiles; }; restoreProgressEvents.EndProjectUpdate(expectedProjectName, expectedFileListName); Assert.Equal(expectedProjectName, actualProjectName); Assert.Equal(expectedFileListName, actualFileListName); }
public void EndProjectUpdate_WithNullProjectName_ThrowsArgumentNullException() { var restoreProgressEvents = new VsRestoreProgressEvents(); Assert.Throws <ArgumentNullException>(() => restoreProgressEvents.EndProjectUpdate(null, new string[] { })); }
public void EndProjectUpdate_WithNullProjectName_ThrowsArgumentNullException() { var restoreProgressEvents = new VsRestoreProgressEvents(_packageProjectProvider.Object, new Mock <INuGetTelemetryProvider>().Object); Assert.Throws <ArgumentNullException>(() => restoreProgressEvents.EndProjectUpdate(null, new string[] { })); }