Esempio n. 1
0
 public Organization FromMpOrganization(MPOrganization mpOrg)
 {
     return(new Organization()
     {
         OrganizationId = mpOrg.OrganizationId,
         ContactId = mpOrg.ContactId,
         EndDate = mpOrg.EndDate,
         StartDate = mpOrg.StartDate,
         Name = mpOrg.Name,
         OpenSignup = mpOrg.OpenSignup
     });
 }
Esempio n. 2
0
        public void ShouldConvertFromMPOrg()
        {
            var mp = new MPOrganization()
            {
                ContactId      = CONTACTID,
                EndDate        = new DateTime(),
                StartDate      = STARTDATE,
                Name           = NAME,
                OpenSignup     = false,
                OrganizationId = ORGID
            };

            var org = new Organization();

            org = org.FromMpOrganization(mp);
            Assert.AreEqual(mp.OrganizationId, org.OrganizationId);
            Assert.AreEqual(mp.ContactId, org.ContactId);
            Assert.AreEqual(mp.EndDate, org.EndDate);
            Assert.AreEqual(mp.StartDate, org.StartDate);
            Assert.AreEqual(mp.Name, org.Name);
            Assert.AreEqual(mp.OpenSignup, org.OpenSignup);
        }