Пример #1
0
        public void ExecuteCorrectlyDeletesNugetPackage([Greedy] NugetPackageDeleter sut)
        {
            var actual = sut.Execute();

            Assert.True(actual);
            sut.DeleteCommand.ToMock().Verify(x => x.Execute(sut), Times.Once());
        }
Пример #2
0
        public void ExecuteLogsCorrectMessage(
            [Greedy] NugetPackageDeleter sut)
        {
            sut.Execute();

            sut.Logger.ToMock().Verify(x => x.Log(
                                           sut,
                                           It.Is <string>(p => p.Contains(sut.NugetId) && p.Contains(sut.NugetVersion)),
                                           MessageImportance.High));
        }
Пример #3
0
 public void NugetVersionIsReadWritable(NugetPackageDeleter sut, string nugetVersion)
 {
     sut.NugetVersion = nugetVersion;
     Assert.Equal(nugetVersion, sut.NugetVersion);
 }
Пример #4
0
 public void NugetIdIsReadWritable(NugetPackageDeleter sut, string nugetId)
 {
     sut.NugetId = nugetId;
     Assert.Equal(nugetId, sut.NugetId);
 }
Пример #5
0
 public void UserPasswordIsReadWritable(NugetPackageDeleter sut, string userPassword)
 {
     sut.UserPassword = userPassword;
     Assert.Equal(userPassword, sut.UserPassword);
 }
Пример #6
0
 public void LoggerIsCorrect(NugetPackageDeleter sut)
 {
     Assert.IsAssignableFrom <TaskLogger>(sut.Logger);
 }
Пример #7
0
 public void NugetPackageDeletionIsCorrect(NugetPackageDeleter sut)
 {
     Assert.IsAssignableFrom <DeletePackageCommand>(sut.DeleteCommand);
 }
Пример #8
0
 public void SutIsTask(NugetPackageDeleter sut)
 {
     Assert.IsAssignableFrom <Task>(sut);
 }
Пример #9
0
 public void SutIsNugetPackageDeletionInfo(NugetPackageDeleter sut)
 {
     Assert.IsAssignableFrom <INugetPackageInfo>(sut);
 }
Пример #10
0
 public void NugetIdIsReadWritable(NugetPackageDeleter sut, string nugetId)
 {
     sut.NugetId = nugetId;
     Assert.Equal(nugetId, sut.NugetId);
 }
Пример #11
0
 public void NugetVersionIsReadWritable(NugetPackageDeleter sut, string nugetVersion)
 {
     sut.NugetVersion = nugetVersion;
     Assert.Equal(nugetVersion, sut.NugetVersion);
 }
Пример #12
0
 public void UserPasswordIsReadWritable(NugetPackageDeleter sut, string userPassword)
 {
     sut.UserPassword = userPassword;
     Assert.Equal(userPassword, sut.UserPassword);
 }
Пример #13
0
 public void LoggerIsCorrect(NugetPackageDeleter sut)
 {
     Assert.IsAssignableFrom<TaskLogger>(sut.Logger);
 }
Пример #14
0
 public void NugetPackageDeletionIsCorrect(NugetPackageDeleter sut)
 {
     Assert.IsAssignableFrom<DeletePackageCommand>(sut.DeleteCommand);
 }
Пример #15
0
 public void SutIsTask(NugetPackageDeleter sut)
 {
     Assert.IsAssignableFrom<Task>(sut);
 }
Пример #16
0
 public void SutIsNugetPackageDeletionInfo(NugetPackageDeleter sut)
 {
     Assert.IsAssignableFrom<INugetPackageInfo>(sut);
 }