public void StartSolutionRestore_WithValidProjectName_FiresProjectUpdateEvent() { var restoreProgressEvents = new VsRestoreProgressEvents(_packageProjectProvider.Object, new Mock <INuGetTelemetryProvider>().Object); var expectedProjectList = new List <string>() { "projectName.csproj" }; IReadOnlyList <string> actualProjectList = null; restoreProgressEvents.SolutionRestoreStarted += (updatedFiles) => { actualProjectList = updatedFiles; }; restoreProgressEvents.StartSolutionRestore(expectedProjectList); Assert.Equal(expectedProjectList, actualProjectList); }
public void StartSolutionRestore_WithValidProjectName_FiresProjectUpdateEvent() { var restoreProgressEvents = new VsRestoreProgressEvents(); var expectedProjectList = new List <string>() { "projectName.csproj" }; IReadOnlyList <string> actualProjectList = null; restoreProgressEvents.SolutionRestoreStarted += (updatedFiles) => { actualProjectList = updatedFiles; }; restoreProgressEvents.StartSolutionRestore(expectedProjectList); Assert.Equal(expectedProjectList, actualProjectList); }
public void StartSolutionRestore_WithEmptyProjectList_ThrowsArgumentException() { var restoreProgressEvents = new VsRestoreProgressEvents(); Assert.Throws <ArgumentException>(() => restoreProgressEvents.StartSolutionRestore(new List <string>())); }
public void StartSolutionRestore_WithNullProjectList_ThrowsArgumentException() { var restoreProgressEvents = new VsRestoreProgressEvents(); Assert.Throws <ArgumentException>(() => restoreProgressEvents.StartSolutionRestore(null)); }
public void StartSolutionRestore_WithEmptyProjectList_ThrowsArgumentException() { var restoreProgressEvents = new VsRestoreProgressEvents(_packageProjectProvider.Object, new Mock <INuGetTelemetryProvider>().Object); Assert.Throws <ArgumentException>(() => restoreProgressEvents.StartSolutionRestore(new List <string>())); }