Beispiel #1
0
        public void TestGetCPRsFromArrayOfobjectIDsWithRandomIDs([ValueSource("CprCounts")] int count)
        {
            var objectIDs = RandomObjectIDs(count);
            System.Diagnostics.Debug.WriteLine("TEST random, #: " + count);
            PersonMasterServiceLibrary.BasicOpClient client = new PersonMasterServiceLibrary.BasicOpClient();
            string aux = null;

            var ret = client.GetCPRsFromObjectIDArray("", objectIDs.ToArray(), ref aux);
            //ValidateOutput(objectIDs, ret);
            System.Diagnostics.Debug.WriteLine("Returned random (" + count + ") IDs: " + ret.Length);
        }
Beispiel #2
0
 public void TestGetCPRsFromArrayOfobjectIDsWithInvalidIDs([ValueSource("CprCounts")] int count)
 {
     var cprNumbers = InvalidObjectIDs(count);
     System.Diagnostics.Debug.WriteLine("TEST invalid, #: " + count);
     PersonMasterServiceLibrary.BasicOpClient client = new PersonMasterServiceLibrary.BasicOpClient();
     string aux = null;
     var ret = client.GetCPRsFromObjectIDArray("", cprNumbers.ToArray(), ref aux);
     Assert.NotNull(aux, "Aux is null");
     if (count > 0)
     {
         Assert.Greater(aux.Length, 0, "Aux is empty");
     }
     for (int i = 0; i < count; i++)
     {
         Assert.IsNull(ret[i], string.Format("Cpr number {0} did not fail", cprNumbers[i]));
     }
     System.Diagnostics.Debug.WriteLine("Returned invalid (" + count + ") IDs: " + ret.Length);
 }
Beispiel #3
0
 public void TestGetCPRsFromArrayOfobjectIDsWithNullValues([ValueSource("CprCounts")] int count)
 {
     var cprNumbers = new String[count];
     PersonMasterServiceLibrary.BasicOpClient client = new PersonMasterServiceLibrary.BasicOpClient();
     string aux = null;
     var ret = client.GetCPRsFromObjectIDArray("", cprNumbers.ToArray(), ref aux);
     Assert.NotNull(aux, "Aux is null");
     Assert.AreEqual(count, ret.Length);
 }
Beispiel #4
0
        public void GetCPRsFromObjectIDArrays_RandomPNR_SmePNRs([ValueSource("CprCounts")] int count)
        {
            var cprNumbers = RandomCprNumbers(count);
            PersonMasterServiceLibrary.BasicOpClient client = new PersonMasterServiceLibrary.BasicOpClient();
            string aux = null;

            System.Diagnostics.Debug.WriteLine("TEST random, #: " + count);
            var objectIDs = client.GetObjectIDsFromCprArray("", cprNumbers, ref aux);

            var ret = client.GetCPRsFromObjectIDArray("", objectIDs.Select(id => id.ToString()).ToArray(), ref aux);

            for (int i = 0; i < count; i++)
            {
                Assert.AreEqual(cprNumbers[i], ret[i], "Different CPR number at index " + i);
            }
        }