public void RoughnessDefaultType() { CrossSection crossSection = CreateDefaultCrossSection(); crossSection.DefaultRoughnessValue = 10.0; RoughnessType roughnessType = crossSection.GetCrossSectionRoughnessSection(0.0).RoughnessType; Assert.AreEqual(RoughnessType.Chezy, roughnessType); }
public void DefaultFriction() { CrossSection crossSection = CreateDefaultCrossSection(); double friction = crossSection.GetCrossSectionRoughnessSection(0.0).Roughness; RoughnessType roughnessType = crossSection.GetCrossSectionRoughnessSection(0.0).RoughnessType; Assert.AreEqual(45.0, friction, 1.0e-6); Assert.AreEqual(RoughnessType.Chezy, roughnessType); }
public async Task <IActionResult> Put(int id, [FromBody] RoughnessType entity) { try { return(Ok(await agent.Update(id, entity))); } catch (Exception ex) { return(await HandleExceptionAsync(ex)); } }
public async Task <IActionResult> Post([FromBody] RoughnessType entity) { try { if (!isValid(entity)) { return(new BadRequestResult()); // This returns HTTP 404 } return(Ok(await agent.Add(entity))); } catch (Exception ex) { return(await HandleExceptionAsync(ex)); } }
public Task <RoughnessType> Update(Int32 pkId, RoughnessType item) { return(this.Update <RoughnessType>(pkId, item)); }
public Task <RoughnessType> Add(RoughnessType item) { return(this.Add <RoughnessType>(item)); }