Skip to content

Commit

Permalink
(chocolatey#449) Template service rename noop to generate_noop
Browse files Browse the repository at this point in the history
This is in preparation for creation of a list_noop method to be used by
the template command. Having just a noop method can be confusing if
there are both generate and list methods.
  • Loading branch information
TheCakeIsNaOH authored and gep13 committed Jan 10, 2022
1 parent 44d7969 commit d38b25b
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ public override void Because()
[Fact]
public void should_call_service_noop()
{
templateService.Verify(c => c.noop(configuration), Times.Once);
templateService.Verify(c => c.generate_noop(configuration), Times.Once);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public override void Context()
}
}

public class when_noop_is_called : TemplateServiceSpecsBase
public class when_generate_noop_is_called : TemplateServiceSpecsBase
{
private Action because;
private readonly ChocolateyConfiguration config = new ChocolateyConfiguration();
Expand All @@ -61,7 +61,7 @@ public override void Context()

public override void Because()
{
because = () => service.noop(config);
because = () => service.generate_noop(config);
}

public override void BeforeEachSpec()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ file a ticket so we can document it at

public virtual void noop(ChocolateyConfiguration configuration)
{
_templateService.noop(configuration);
_templateService.generate_noop(configuration);
}

public virtual void run(ChocolateyConfiguration configuration)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ namespace chocolatey.infrastructure.app.services

public interface ITemplateService
{
void noop(ChocolateyConfiguration configuration);
void generate_noop(ChocolateyConfiguration configuration);
void generate(ChocolateyConfiguration configuration);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public TemplateService(IFileSystem fileSystem)
_fileSystem = fileSystem;
}

public void noop(ChocolateyConfiguration configuration)
public void generate_noop(ChocolateyConfiguration configuration)
{
var templateLocation = _fileSystem.combine_paths(configuration.OutputDirectory ?? _fileSystem.get_current_directory(), configuration.NewCommand.Name);
this.Log().Info(() => "Would have generated a new package specification at {0}".format_with(templateLocation));
Expand Down

0 comments on commit d38b25b

Please sign in to comment.