public void NotNullResult() { Setup(); SimpleDTO obj = faker.Create <SimpleDTO>(); Assert.IsNotNull(obj); }
public void NotDefaultField() { Setup(); SimpleDTO obj = faker.Create <SimpleDTO>(); Assert.AreNotEqual(obj.simpleField, 0); }
public void SupportSimpleDTOAsParameter() { SimpleDTO received = null; _first.RegisterLocalService((Action <SimpleDTO>)(a => received = a)); var d = _second.QueryRemoteService <Action <SimpleDTO> >(); d(new SimpleDTO { Name = "Text", Number = 3.14 }); Assert.NotNull(received); Assert.Equal("Text", received.Name); AreDoubleEqual(3.14, received.Number, 1e-14); }
protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e) { lista = service.listarMarcas(); SimpleDTO dto = lista[e.RowIndex]; try { bool resultado = service.eliminarMarca(dto); listar(); txtMarca.Text = ""; } catch (Exception e1) { lblMsg.Text = e1.Message; } }
protected void btnConfirmar_Click(object sender, EventArgs e) { try { SimpleDTO entidad = service.crearMarca(txtMarca.Text); if (entidad != null) { listar(); txtMarca.Text = ""; } } catch (Exception e1) { lblMsg.Text = e1.Message; } }
public void CanSendAndRegisterOtherTypes() { SimpleDTO received = null; _first.RegisterLocalService((Action <object>)(r => received = (SimpleDTO)r)); _first.RegisterLocalType(typeof(SimpleDTO)); var d = _second.QueryRemoteService <Action <object> >(); d(new SimpleDTO { Name = "Text", Number = 3.14 }); Assert.NotNull(received); Assert.Equal("Text", received.Name); AreDoubleEqual(3.14, received.Number, 1e-14); }
public bool eliminar(SimpleDTO dto) { Marca entidad = new Marca { idMarca = dto.id, nombre = dto.descripcion }; using (PompeyoCarrascoEntities dbo = new PompeyoCarrascoEntities()) { dbo.Marca.Attach(entidad); entidad = dbo.Marca.Remove(entidad); dbo.SaveChanges(); } return(entidad == null); }
public bool eliminarMarca(SimpleDTO marca) { return(marcaNeg.eliminar(marca)); }
public bool eliminar(SimpleDTO dto) { return(dal.eliminar(dto)); }