public void Setup() { var node = new UriBuilder("localhost") { Port = 9200 }; settings = new ESSettings(node); index = "test_" + ESRepositorio.ContentType.show.ToString(); repository = new ESRepositorio(settings, index); repository.CreateIndex(); }
public void SiEliminoUnaFechaInexistenteObtengoUnError() { var fecha = CrearFecha(UtilitiesAndStuff.GenerateUniqueId(), DateTime.Now, UtilitiesAndStuff.GenerateUniqueId()); repository.CreateIndex(); try { repository.DeleteFecha(fecha.UniqueId); } catch (Exception ex) { Assert.AreEqual(ex.Message, ESRepositorio.FECHA_DELETE_NOT_EXISTS_EXCEPTION); } }
public void SiEliminoUnShowInexistenteObtengoUnError() { var nombre = "show"; var show = CrearShow(nombre); repository.CreateIndex(); try { repository.DeleteShow(show.Nombre); } catch (Exception ex) { Assert.AreEqual(ex.Message, ESRepositorio.SHOW_DELETE_NOT_EXISTS_EXCEPTION); } }
public void SiEliminoUnStanduperoInexistenteObtengoUnError() { var dni = "32576829"; var standupero = CrearStandupero(dni, "Giulianetti", "Bruno", "Argentina"); repository.CreateIndex(); try { repository.DeleteStandupero(standupero.Dni); } catch (Exception ex) { Assert.AreEqual(ex.Message, ESRepositorio.STANDUPERO_DELETE_NOT_EXISTS_EXCEPTION); } }
public void SiEliminoUnProductorInexistenteObtengoUnError() { var dni = "32576829"; var productor = CrearProductor(dni, "Giulianetti", "Bruno", "Argentina"); repository.CreateIndex(); try { repository.GetProductorByDni(productor.Dni); } catch (Exception ex) { Assert.AreEqual(ex.Message, ESRepositorio.PRODUCTOR_DELETE_NOT_EXISTS_EXCEPTION); } }
public void SiEliminoUnaSalaInexistenteObtengoUnError() { var id = UtilitiesAndStuff.GenerateUniqueId(); var sala = CrearSala(id); repository.CreateIndex(); try { repository.DeleteSala(sala.UniqueId); } catch (Exception ex) { Assert.AreEqual(ex.Message, ESRepositorio.SALA_DELETE_NOT_EXISTS_EXCEPTION); } }