public void ThatAddedShapeCanBeFound() { var shape = ShapeServices.WithDto(ShapeTestFixtures.GetIvFluidDto()).Get(); Assert.AreEqual(shape, ShapeServices.Shapes.Single( x => x.Name == shape.Name)); }
public void ThatShapeCanBeDeleted() { var shape = ShapeServices.WithDto(ShapeTestFixtures.GetIvFluidDto()).Get(); ShapeServices.Delete(shape); Assert.IsNull(ShapeServices.Shapes.SingleOrDefault(x => x.Name == ShapeTestFixtures.GetIvFluidDto().Name)); }
public void ThatShapeCanBeUpdated() { var shape = ShapeServices.WithDto(ShapeTestFixtures.GetIvFluidDto()).Get(); // ToDo: rewrite // shape.Environment = shape.Environment + "_changed"; Assert.IsNotNull(ShapeServices.Shapes.SingleOrDefault(x => x.Name == shape.Name)); }
public void ThatShapeWithoutNameThrowsException() { try { var dto = ShapeTestFixtures.GetIvFluidDto(); dto.Name = String.Empty; Shape.Create(dto); Assert.Fail(); } catch (Exception e) { Assert.IsNotInstanceOfType(e, typeof(AssertFailedException)); } }
public void ThatShapeCanBeGet() { var shape = ShapeServices.WithDto(ShapeTestFixtures.GetIvFluidDto()).Get(); Assert.IsNotNull(shape); }