예제 #1
0
 public GithubActionServiceTests()
 {
     _writeLine = new Mock <Action <string> >();
     _fixture   = new Fixture().Customize(new AutoMoqCustomization {
         ConfigureMembers = true
     });
     _githubActionService = new GithubActionService
     {
         WriteLine   = _writeLine.Object,
         FatalAction = () => _numberOfFatalExits++
     };
     _fixture.Register(() => _githubActionService);
 }
예제 #2
0
 public GithubApiServiceTests()
 {
     _httpTest = new HttpTest();
     _settings = new Settings
     {
         Project  = "test/project",
         Token    = "authToken",
         Workflow = "build",
         Branch   = "main",
         Status   = "success"
     };
     _fixture = new Fixture().Customize(new AutoMoqCustomization {
         ConfigureMembers = true
     });
     _writeLine           = new Mock <Action <string> >();
     _githubActionService = new GithubActionService
     {
         WriteLine = _writeLine.Object
     };
     _fixture.Register(() => _githubActionService);
 }
 public GithubApiService(Settings settings, IGithubActionService githubActionService)
 {
     _settings            = settings;
     _githubActionService = githubActionService;
 }