Exemplo n.º 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());
        }
Exemplo n.º 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));
        }