Skip to content

Commit

Permalink
Update/Fix tests and add a test for list
Browse files Browse the repository at this point in the history
  • Loading branch information
Jaykul committed Mar 2, 2015
1 parent 4987e54 commit 6faa13c
Showing 1 changed file with 19 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ public void should_call_service_source_list_when_command_is_list()
{
configuration.SourceCommand.Command = SourceCommandType.list;
because();
configSettingsService.Verify(c => c.source_list(configuration), Times.Once);
configSettingsService.Verify(c => c.source_list(configuration, true), Times.Once);
}

[Fact]
Expand Down Expand Up @@ -380,5 +380,23 @@ public void should_call_service_source_enable_when_command_is_enable()
configSettingsService.Verify(c => c.source_enable(configuration), Times.Once);
}
}

public class when_list_is_called : ChocolateySourceCommandSpecsBase
{
private Action because;

public override void Because()
{
because = () => command.list(configuration, true);
}

[Fact]
public void should_call_service_source_list_when_command_is_list()
{
configuration.SourceCommand.Command = SourceCommandType.list;
because();
configSettingsService.Verify(c => c.source_list(configuration, true), Times.Once);
}
}
}
}

0 comments on commit 6faa13c

Please sign in to comment.