Esempio n. 1
0
        public ProxyDTO.Facebook.FacebookCampaignDTO NextFacebookCampaignDTO()
        {
            ProxyDTO.Facebook.FacebookCampaignDTO facebookCampaignDTO = new ProxyDTO.Facebook.FacebookCampaignDTO();
            facebookCampaignDTO.Budget         = (decimal)RandomData.NextDouble(0.02, 1);
            facebookCampaignDTO.BudgetType     = (int)NextFacebookBudgetType();
            facebookCampaignDTO.LastUpdateTime = RandomData.NextDateTime(new TimeSpan(1, 0, 0, 0));
            facebookCampaignDTO.Name           = RandomData.NextUnicodeWord(500);
            facebookCampaignDTO.StartTime      = facebookCampaignDTO.LastUpdateTime + new TimeSpan(1, 0, 0);
            facebookCampaignDTO.StopTime       = facebookCampaignDTO.StartTime + new TimeSpan(1, 0, 0);
            facebookCampaignDTO.Status         = RandomData.NextInt32();

            //for base
            facebookCampaignDTO.AccountId = (Int64)RandomData.NextUInt32();

            //for root
            facebookCampaignDTO.EngineType    = (int)NextSearchEngineType();
            facebookCampaignDTO.Id            = (Int64)RandomData.NextUInt32();
            facebookCampaignDTO.LocalId       = (Int64)RandomData.NextUInt32();
            facebookCampaignDTO.LocalParentId = (Int64)RandomData.NextUInt32();
            facebookCampaignDTO.LocalState    = RandomData.NextByte();
            facebookCampaignDTO.LocalStatus   = RandomData.NextByte();
            facebookCampaignDTO.SynState      = NextSyncState();
            facebookCampaignDTO.Version       = (Int64)RandomData.NextUInt32();
            facebookCampaignDTO.ParentId      = (Int64)RandomData.NextUInt32();

            return(facebookCampaignDTO);
        }
Esempio n. 2
0
 public void CompareFacebookCampaignDTOAndEntityObject(ProxyDTO.Facebook.FacebookCampaignDTO facebookCampaignDTO, TblFacebookCampaign facebookCampaignEntity, long localId, long localParentId, int version)
 {
     Assert.AreEqual(facebookCampaignDTO.Id, facebookCampaignEntity.Id, "The campaign id should be equal!!");
     Assert.AreEqual(localId, facebookCampaignEntity.LocalId, "The campaign local id should be equal!!");
     Assert.AreEqual(localParentId, facebookCampaignEntity.LocalParentId, "The campaign local parent id should be equal!!");
     Assert.AreEqual(facebookCampaignDTO.ParentId, facebookCampaignEntity.ParentId, "The campaign parent id should be equal!!");
     Assert.AreEqual(facebookCampaignDTO.LocalStatus, facebookCampaignEntity.LocalStatus, "The campaign local status should be equal!!");
     Assert.AreEqual(facebookCampaignDTO.LocalState, facebookCampaignEntity.LocalState, "The campaign local state should be equal!!");
     Assert.AreEqual(facebookCampaignDTO.Name, facebookCampaignEntity.Name, "The campaign name should be equal!!");
     Assert.AreEqual(facebookCampaignDTO.Status, facebookCampaignEntity.Status, "The campaign status should be equal!!");
     Assert.AreEqual(version, facebookCampaignEntity.Version, "The campaign version should be equal!!");
 }