public void EqualsTrue() { var site1 = new Site("X"); var site2 = new Site("X"); var anuncio1 = new Anuncio(new Alvo(site1, 1)); var anuncio2 = new Anuncio(new Alvo(site2, 1)); Assert.IsTrue(anuncio1.Equals(anuncio2)); }
private static Site Parse(DataRow row) { Site retorno = new Site(row["nome"].ToString()); retorno.RegexBairro = row["regexBairro"].ToString(); retorno.RegexNumeroQuartos = row["regexNumeroQuartos"].ToString(); retorno.RegexPreco = row["regexPreco"].ToString(); retorno.RegexArea = row["regexArea"].ToString(); retorno.RegexTipoImovel = row["regexTipoImovel"].ToString(); retorno.RegexTipoTransacao = row["regexTipoTransacao"].ToString(); retorno.TemplateUrl = row["templateUrl"].ToString(); return retorno; }
public Alvo(Site site, int id) { this.SiteOrigem = site; this.id = id; }
/// <summary> /// Gerar uma lista de Alvos /// </summary> /// <param name="nomeSite"></param> /// <param name="idInicio"></param> /// <param name="idFim"></param> /// <returns></returns> public IList<Alvo> GetAlvos(Site site, int idInicio, int idFim) { //var site = Site.GetSitePorNome(nomeSite); var retorno = new List<Alvo>(); for (int i = idInicio; i <= idFim; i++) { retorno.Add(new Alvo(site, i)); } return retorno; }
public void TestInicitalize() { this.siteInfonet = Site.GetSitePorNome("Infonet"); }