예제 #1
0
 [TestMethod] //Test Case 8 : One Invalid DMS Numbers
 public void GetAttachmentStatusWithInvalidDmsNumber()
 {
     dmsRefNumbers[0] = "890de2b5-ec3a-4b2b-9cab-4a63b1bf9111";
     response         = AttachmentStatus(ConfigurationManager.AppSettings["GetAttachmentStatus"], dmsRefNumbers);
     MyResponses statusresponses = JsonConvert.DeserializeObject <MyResponses>(response.Content);
     //Do Assertion here
 }
예제 #2
0
 [TestMethod] //Test Case 6 : One DMS Numbers & One InValid FecilityID
 public void GetAttachmentStatusWithDmsNumberAndInValidFecilityID()
 {
     dmsRefNumbers = UploadDocumentToVyne(1);
     response      = AttachmentStatus(ConfigurationManager.AppSettings["GetAttachmentStatus"], dmsRefNumbers, "ABCD123");
     MyResponses statusresponses = JsonConvert.DeserializeObject <MyResponses>(response.Content);
     //Do Assertion here
 }
예제 #3
0
 [TestMethod] //Test Case 4 : Four DMS Numbers
 public void GetAttachmentStatusWithFourDmsNumbers()
 {
     dmsRefNumbers = UploadDocumentToVyne(4);
     response      = AttachmentStatus(ConfigurationManager.AppSettings["GetAttachmentStatus"], dmsRefNumbers);
     MyResponses statusresponses = JsonConvert.DeserializeObject <MyResponses>(response.Content);
     //Do Assertion here
 }
예제 #4
0
        //IList<string> msgs = new List<string>();
        ////[TestMethod]
        //public IList<string> ResMessages(string msg)
        //{
        //    //string msg = "{\"attachmentId\":48494,\"nte\":\"MEA#48494\",\"pwk\":\"MEA48494\"}";
        //    string[] nmsg = msg.Replace("\""," ").Replace("}", " ").Split(',');
        //    msgs.Add(nmsg[0].Split(':')[1].Trim()); msgs.Add(nmsg[1].Split(':')[1].Trim()); msgs.Add(nmsg[2].Split(':')[1].Trim());
        //    return msgs;
        //}
        public void ValidateGetAttachmentStatus(List <List <RootObject> > MetaDataList, MyResponses myResponses)
        {
            string nte = null;
            string pwk = null;

            for (int i = 0; i < MetaDataList.Count; i++)
            {
                Console.WriteLine("DMS Number :" + i + " - " + myResponses.Responses.ElementAt(i).dmsInternalReferenceNumber);
                var msgs = RespStatusMessages(MetaDataList.ElementAt(i).ElementAt(i).responseDetails.ResponseMessage);
                for (int j = 0; j < MetaDataList.Count; j++)
                {
                    if (MetaDataList.ElementAt(i).ElementAt(0).attachment.dmsInternalReferenceNumber == myResponses.Responses.ElementAt(j).dmsInternalReferenceNumber)
                    {
                        nte = myResponses.Responses.ElementAt(j).nte;
                        pwk = myResponses.Responses.ElementAt(j).nte;
                    }
                }
                //Assert.AreEqual(msgs.attachmentId, myResponses.Responses.ElementAt(i).attachmentId);
                Assert.AreEqual(msgs.nte, nte);
                Assert.AreEqual(msgs.pwk, pwk);
            }
        }
예제 #5
0
 public void ReadStatusResponse()
 {
     string JsonFilePath = AppDomain.CurrentDomain.BaseDirectory.Replace("\\bin\\Debug", "\\") + "SeleniumPractice\\EASubmitter\\Data\\AttachmentStatus.json";
     //responses = JsonConvert.DeserializeObject<Responses>(File.ReadAllText(JsonFilePath));
     MyResponses a = JsonConvert.DeserializeObject <MyResponses>(File.ReadAllText(JsonFilePath));
 }
예제 #6
0
 [TestMethod] //Test Case 10 : Two FecilityIDs
 public void GetAttachmentStatusWithTwoFecilityIDs()
 {
     response = AttachmentStatus(ConfigurationManager.AppSettings["GetAttachmentStatus"], "abcd1234", "xyzw123");
     MyResponses statusresponses = JsonConvert.DeserializeObject <MyResponses>(response.Content);
     //Do Assertion here
 }