Exemplo n.º 1
0
        public void ThatAddedShapeCanBeFound()
        {
            var shape = ShapeServices.WithDto(ShapeTestFixtures.GetIvFluidDto()).Get();

            Assert.AreEqual(shape, ShapeServices.Shapes.Single(
                                x => x.Name == shape.Name));
        }
Exemplo n.º 2
0
        public void ThatShapeCanBeDeleted()
        {
            var shape = ShapeServices.WithDto(ShapeTestFixtures.GetIvFluidDto()).Get();

            ShapeServices.Delete(shape);
            Assert.IsNull(ShapeServices.Shapes.SingleOrDefault(x => x.Name == ShapeTestFixtures.GetIvFluidDto().Name));
        }
Exemplo n.º 3
0
        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));
        }
Exemplo n.º 4
0
 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));
     }
 }
Exemplo n.º 5
0
        public void ThatShapeCanBeGet()
        {
            var shape = ShapeServices.WithDto(ShapeTestFixtures.GetIvFluidDto()).Get();

            Assert.IsNotNull(shape);
        }