Refactor to api connections. Update Checker.
This commit is contained in:
@@ -25,5 +25,35 @@ namespace UnitTests
|
||||
Assert.AreEqual("\"1|Endo|2|Implant|3|Oral Surgery|4|Ortho|5|Pedo|6|Perio|7|Restore|8|Other \\n\"", res);
|
||||
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void TestV2Get()
|
||||
{
|
||||
APICredentials creds = new APICredentials();
|
||||
creds.UserID = "testdoctor";
|
||||
creds.Password = "testdoctor";
|
||||
creds.PracticeId = "210";
|
||||
creds.APIid = "12345678";
|
||||
|
||||
APIConnection conn = new APIConnection("https://localhost:44354/", creds);
|
||||
string res = conn.SendPostWithCredsInHeader("api/PWAppVersion", "");
|
||||
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
[ExpectedException(typeof(RequestFailedExcpetion))]
|
||||
public void TestInvalidCredentialsV2()
|
||||
{
|
||||
APICredentials creds = new APICredentials();
|
||||
creds.UserID = "testdoctor";
|
||||
creds.Password = "badPassword";
|
||||
creds.PracticeId = "210";
|
||||
creds.APIid = "12345678";
|
||||
|
||||
APIConnection conn = new APIConnection("https://localhost:44354/", creds);
|
||||
string res = conn.SendPostWithCredsInHeader("api/PWAppVersion", "");
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user