public void Should_Add_AuthType_To_Arguments_If_Set(TfxAuthType authType, string expected) { // Given var fixture = new TfxExtensionPublishRunnerFixture(); fixture.Settings.AuthType = authType; // When var result = fixture.Run(); // Then Assert.Equal(expected, result.Args); }
private static string GetAuthName(TfxAuthType authType) { switch (authType) { case TfxAuthType.Pat: return("pat"); case TfxAuthType.Basic: return("basic"); default: throw new NotSupportedException("The provided authentication is not valid"); } }