Created Unit Test Project

This commit is contained in:
Matthew Burke
2023-08-14 17:10:38 -04:00
parent 19153c9d02
commit 4a4bcc81e0
10 changed files with 167 additions and 51 deletions
+29
View File
@@ -0,0 +1,29 @@
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using PWAPPv2.Source.API;
using PWAPPv2.Source.DataObjects;
// System.Threading.Tasks.Task<TResult>.Result.get returned "\"1|Endo|2|Implant|3|Oral Surgery|4|Ortho|5|Pedo|6|Perio|7|Restore|8|Other \\n\"" string
namespace UnitTests
{
[TestClass]
public class UnitTest1
{
[TestMethod]
public void TestV1Get()
{
APICredentials creds = new APICredentials();
creds.UserID = "testdoctor";
creds.Password = "testdoctor";
creds.PracticeId = "210";
creds.APIid = "12345678";
APIConnection conn = new APIConnection("http://apipatientweb.azurewebsites.net/", creds);
string res = conn.SendPostRequestAsync("api/PWReferralTypes");
Assert.AreEqual("\"1|Endo|2|Implant|3|Oral Surgery|4|Ortho|5|Pedo|6|Perio|7|Restore|8|Other \\n\"", res);
}
}
}