コード例 #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="AzureDevopsEnvironment"/> class.
 /// </summary>
 /// <param name="accessor">The accessor for environment variables.</param>
 public AzureDevopsEnvironment(IEnvironmentVariableAccessor accessor)
     : base(accessor)
 {
     CanonicalBranchName = Variables.GetVariable("BUILD_SOURCEBRANCH");
     if (CanonicalBranchName != null)
     {
         BranchName = _trim.Replace(CanonicalBranchName, string.Empty);
     }
 }
コード例 #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DefaultVersionEnvironment"/> class.
 /// </summary>
 /// <param name="accessor">The accessor for environment variables.</param>
 public DefaultVersionEnvironment(IEnvironmentVariableAccessor accessor) : base(accessor)
 {
 }
コード例 #3
0
 public StubVersionEnvironment(IEnvironmentVariableAccessor accessor) : base(accessor)
 {
 }
コード例 #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="BaseVersionEnvironment"/> class.
 /// </summary>
 /// <param name="accessor">The accessor for environment variables.</param>
 public BaseVersionEnvironment(IEnvironmentVariableAccessor accessor)
 {
     Variables = accessor ?? throw new ArgumentNullException(nameof(accessor));
 }
コード例 #5
0
 public AzureDevopsEnvironmentFixture()
 {
     _env = Substitute.For <IEnvironmentVariableAccessor>();
 }
コード例 #6
0
 public DefaultVersionEnvironmentFixture()
 {
     _env = Substitute.For <IEnvironmentVariableAccessor>();
 }