Ejemplo n.º 1
0
        /// <summary>
        /// Deserialize the mock VJobCandidate entity from a temporary file.
        /// </summary>
        private void Step_7_DeserializeEntity_Generated()
        {
            string fileName = "temp_VJobCandidate.xml";

            XmlSerializer mySerializer = new XmlSerializer(typeof(VJobCandidate));

            System.IO.FileStream myFileStream = new System.IO.FileStream(fileName, System.IO.FileMode.Open);
            mock = (VJobCandidate)mySerializer.Deserialize(myFileStream);
            myFileStream.Close();
            System.IO.File.Delete(fileName);

            System.Console.WriteLine("mock correctly deserialized from a temporary file.");
        }
Ejemplo n.º 2
0
        ///<summary>
        ///  Returns a Typed VJobCandidate Entity with mock values.
        ///</summary>
        static public VJobCandidate CreateMockInstance()
        {
            VJobCandidate mock = new VJobCandidate();

            mock.JobCandidateId               = TestUtility.Instance.RandomNumber();
            mock.EmployeeId                   = TestUtility.Instance.RandomNumber();
            mock.SafeNameNamePrefix           = TestUtility.Instance.RandomString(14, false);;
            mock.SafeNameNameFirst            = TestUtility.Instance.RandomString(14, false);;
            mock.SafeNameNameMiddle           = TestUtility.Instance.RandomString(14, false);;
            mock.SafeNameNameLast             = TestUtility.Instance.RandomString(14, false);;
            mock.SafeNameNameSuffix           = TestUtility.Instance.RandomString(14, false);;
            mock.Skills                       = TestUtility.Instance.RandomString(2, false);;
            mock.SafeNameAddrType             = TestUtility.Instance.RandomString(14, false);;
            mock.SafeNameAddrLocCountryRegion = TestUtility.Instance.RandomString(49, false);;
            mock.SafeNameAddrLocState         = TestUtility.Instance.RandomString(49, false);;
            mock.SafeNameAddrLocCity          = TestUtility.Instance.RandomString(49, false);;
            mock.SafeNameAddrPostalCode       = TestUtility.Instance.RandomString(9, false);;
            mock.Email        = TestUtility.Instance.RandomString(2, false);;
            mock.WebSite      = TestUtility.Instance.RandomString(2, false);;
            mock.ModifiedDate = TestUtility.Instance.RandomDateTime();
            return((VJobCandidate)mock);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Convert a nettiers entity to the ws proxy entity.
        /// </summary>
        public static WsProxy.VJobCandidate Convert(VJobCandidate item)
        {
            WsProxy.VJobCandidate outItem = new WsProxy.VJobCandidate();
            outItem.JobCandidateId               = item.JobCandidateId;
            outItem.EmployeeId                   = item.EmployeeId;
            outItem.SafeNameNamePrefix           = item.SafeNameNamePrefix;
            outItem.SafeNameNameFirst            = item.SafeNameNameFirst;
            outItem.SafeNameNameMiddle           = item.SafeNameNameMiddle;
            outItem.SafeNameNameLast             = item.SafeNameNameLast;
            outItem.SafeNameNameSuffix           = item.SafeNameNameSuffix;
            outItem.Skills                       = item.Skills;
            outItem.SafeNameAddrType             = item.SafeNameAddrType;
            outItem.SafeNameAddrLocCountryRegion = item.SafeNameAddrLocCountryRegion;
            outItem.SafeNameAddrLocState         = item.SafeNameAddrLocState;
            outItem.SafeNameAddrLocCity          = item.SafeNameAddrLocCity;
            outItem.SafeNameAddrPostalCode       = item.SafeNameAddrPostalCode;
            outItem.Email        = item.Email;
            outItem.WebSite      = item.WebSite;
            outItem.ModifiedDate = item.ModifiedDate;

            return(outItem);
        }