コード例 #1
0
            public void Should_Upload_Artifact_For_ArtifactType(AppVeyorUploadArtifactType type, string arg)
            {
                // Given
                var fixture = new AppVeyorFixture();

                fixture.IsRunningOnAppVeyor();
                var appVeyor = fixture.CreateAppVeyorService();

                // When
                appVeyor.UploadArtifact("./file.zip", settings => settings.SetArtifactType(type));

                // Then
                fixture.ProcessRunner.Received(1).Start(
                    Arg.Is <FilePath>(p => p.FullPath == "appveyor"),
                    Arg.Is <ProcessSettings>(p => p.Arguments.Render()
                                             == string.Format("PushArtifact -Path \"/Working/file.zip\" -FileName \"file.zip\" -ArtifactType \"{0}\"", arg)));
            }
コード例 #2
0
 /// <summary>
 /// Sets the type of artifact being uploaded to AppVeyor
 /// </summary>
 /// <param name="type">The type of artifact being uploaded</param>
 /// <returns>The settings</returns>
 public AppVeyorUploadArtifactsSettings SetArtifactType(AppVeyorUploadArtifactType type)
 {
     ArtifactType = type;
     return(this);
 }