示例#1
0
        public void EndSolutionRestore_WithValidProjectName_FiresProjectUpdateEvent()
        {
            var restoreProgressEvents = new VsRestoreProgressEvents(_packageProjectProvider.Object, new Mock <INuGetTelemetryProvider>().Object);
            var expectedProjectList   = new List <string>()
            {
                "projectName.csproj"
            };

            IReadOnlyList <string> actualProjectList = null;

            restoreProgressEvents.SolutionRestoreFinished += (updatedFiles) =>
            {
                actualProjectList = updatedFiles;
            };

            restoreProgressEvents.EndSolutionRestore(expectedProjectList);

            Assert.Equal(expectedProjectList, actualProjectList);
        }
        public void EndSolutionRestore_WithEmptyProjectList_ThrowsArgumentException()
        {
            var restoreProgressEvents = new VsRestoreProgressEvents();

            Assert.Throws <ArgumentException>(() => restoreProgressEvents.EndSolutionRestore(new List <string>()));
        }
        public void EndSolutionRestore_WithNullProjectList_ThrowsArgumentException()
        {
            var restoreProgressEvents = new VsRestoreProgressEvents();

            Assert.Throws <ArgumentException>(() => restoreProgressEvents.EndSolutionRestore(null));
        }
示例#4
0
        public void EndSolutionRestore_WithEmptyProjectList_ThrowsArgumentException()
        {
            var restoreProgressEvents = new VsRestoreProgressEvents(_packageProjectProvider.Object, new Mock <INuGetTelemetryProvider>().Object);

            Assert.Throws <ArgumentException>(() => restoreProgressEvents.EndSolutionRestore(new List <string>()));
        }