public void Should_Throw_If_Settings_Are_Null() { // Given BaseAzureDevOpsCollectionSettingsImpl settings = null; // When var result = Record.Exception(() => new BaseAzureDevOpsCollectionSettingsImpl(settings)); // Then result.IsArgumentNullException("settings"); }
public void Should_Set_Collection_Url() { // Given var collectionUrl = new Uri("http://example.com/collection"); var credentials = AuthenticationProvider.AuthenticationNtlm(); // When var result = new BaseAzureDevOpsCollectionSettingsImpl(collectionUrl, credentials); // Then result.CollectionUrl.ShouldBe(collectionUrl); }
public void Should_Set_Collection_Url() { // Given var credentials = new AzureDevOpsNtlmCredentials(); Environment.SetEnvironmentVariable("SYSTEM_TEAMFOUNDATIONCOLLECTIONURI", "https://example.com/collection"); // When var settings = new BaseAzureDevOpsCollectionSettingsImpl(credentials); // Then settings.CollectionUrl.ToString().ShouldBe(new Uri("https://example.com/collection").ToString()); }