예제 #1
0
 public void TestNullValues(
     [ValueSource("CprCounts")] int count)
 {
     string[] cprNumbers = new string[count];
     PersonMasterServiceLibrary.BasicOpClient client = new PersonMasterServiceLibrary.BasicOpClient();
     string aux = null;
     var ret = client.GetObjectIDsFromCprArray("", cprNumbers.ToArray(), ref aux);
     Assert.NotNull(ret, "Output array is null");
     Assert.AreEqual(count, ret.Length);
 }
예제 #2
0
        public void TestGetUuidArrayOfRandomCpr(
            [ValueSource("CprCounts")] int count)
        {
            var cprNumbers = RandomCprNumbers(count);
            PersonMasterServiceLibrary.BasicOpClient client = new PersonMasterServiceLibrary.BasicOpClient();
            string aux = null;

            var ret = client.GetObjectIDsFromCprArray("", cprNumbers.ToArray(), ref aux);
            ValidateOutput(cprNumbers, ret);
        }
예제 #3
0
        public void TestInvalidCprNumbers(
            [ValueSource("CprCounts")] int count)
        {
            var cprNumbers = InvalidCprNumbers(count);

            PersonMasterServiceLibrary.BasicOpClient client = new PersonMasterServiceLibrary.BasicOpClient();
            string aux = null;
            var ret = client.GetObjectIDsFromCprArray("", cprNumbers.ToArray(), ref aux);
            Assert.NotNull(aux, "Aux is null");
            Console.WriteLine(aux);
            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]));
            }
        }
예제 #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);
            }
        }