コード例 #1
0
        public void ThatAddedShapeCanBeFound()
        {
            var shape = ShapeServices.WithDto(ShapeTestFixtures.GetIvFluidDto()).Get();

            Assert.AreEqual(shape, ShapeServices.Shapes.Single(
                                x => x.Name == shape.Name));
        }
コード例 #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));
        }
コード例 #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));
        }
コード例 #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));
     }
 }
コード例 #5
0
        public void ThatShapeCanBeGet()
        {
            var shape = ShapeServices.WithDto(ShapeTestFixtures.GetIvFluidDto()).Get();

            Assert.IsNotNull(shape);
        }