What is the pendant of the NUnit TestCaseAttribute for MS Test?
see this sample:
[TestCase("Authorization", "Basic", "test@gmail.com:Mypassword", HttpStatusCode.OK)]
[TestCase("Authorization", "bASic", "test@gmail.com:Mypassword", HttpStatusCode.OK)]
[TestCase("WrongAuthorization", "Basic", "test@gmail.com:Mypassword", HttpStatusCode.Unauthorized)]
[TestCase("Authorization", "WrongBasic", "test@gmail.com:Mypassword", HttpStatusCode.Unauthorized)]
[TestCase("Authorization", "Basic", "test@gmail.com:Mypassword:anotherpassword", HttpStatusCode.Unauthorized)]
[TestCase("Authorization", "Basic", "", HttpStatusCode.Unauthorized)]
[TestCase("test", "", "test@gmail.com:Mypassword", HttpStatusCode.Unauthorized)]
public void Authenticate_User(string headerName, string headerValue, string credentials, HttpStatusCode expectedStatusCode)
{
// Arrange
var encodedEmailPassword = Convert.ToBase64String(Encoding.ASCII.GetBytes(credentials));
_client.DefaultRequestHeaders.Add(headerName, headerValue + " " + encodedEmailPassword);
// Act
var response = _client.SendAsync(new HttpRequestMessage(HttpMethod.Post, _server.BaseAddress + "api/authentication")).Result;
// Assert
Assert.That(response.StatusCode == expectedStatusCode);
}