示例#1
0
        public void ThatShapeIsAssociatedWithPackage()
        {
            var package = PackageServices.WithDto(GetPackageDto()).Get();
            var shape   = ShapeServices.WithDto(ShapeTestFixtures.GetValidDtoWithPackages()).Get();

            Assert.AreEqual(shape.PackageSet.Single(p => p.Name == package.Name), package);
        }
示例#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 ThatShapeWithUnitGroupsCanBeDeletedLeavingUnitGroups()
        {
            var shape = ShapeServices.WithDto(ShapeTestFixtures.GetValidDtoWithUnitGroups()).Get();

            ShapeServices.Delete(shape);
            Assert.IsNotNull(UnitGroupServices.UnitGroups.SingleOrDefault(x => x.Name == ShapeTestFixtures.GetValidDtoWithUnitGroups().UnitGroups.First().Name));
        }
示例#4
0
        public void ThatAddedShapeCanBeFound()
        {
            var shape = ShapeServices.WithDto(ShapeTestFixtures.GetIvFluidDto()).Get();

            Assert.AreEqual(shape, ShapeServices.Shapes.Single(
                                x => x.Name == shape.Name));
        }
示例#5
0
        public void ThatShapeUnitGroupRelationshipIsBiDirectional()
        {
            var unitGroup = UnitGroupServices.WithDto(GetUnitGroupDto()).Get();
            var shape     = ShapeServices.WithDto(ShapeTestFixtures.GetValidDtoWithUnitGroups()).Get();

            Assert.AreEqual(shape, unitGroup.Shapes.First());
        }
示例#6
0
        public void ThatShapeIsAssociatedWithUnitGroup()
        {
            var unitGroup = UnitGroupServices.WithDto(GetUnitGroupDto()).Get();
            var shape     = ShapeServices.WithDto(ShapeTestFixtures.GetValidDtoWithUnitGroups()).Get();

            Assert.AreEqual(shape.UnitGroupSet.Single(p => p.Name == unitGroup.Name), unitGroup);
        }
示例#7
0
        public void ThatShapeRouteRelationshipIsBiDirectional()
        {
            var route = RouteServices.WithDto(GetRouteDto()).Get();
            var shape = ShapeServices.WithDto(ShapeTestFixtures.GetValidDtoWithRoutes()).Get();

            Assert.AreEqual(shape, route.ShapeSet.First());
        }
示例#8
0
        public void ThatShapeWithAfterDeleteLeavesPackage()
        {
            var shape = ShapeServices.WithDto(ShapeTestFixtures.GetValidDtoWithPackages()).Get();

            ShapeServices.Delete(shape);
            Assert.IsNotNull(PackageServices.Packages.SingleOrDefault(x => x.Name == ShapeTestFixtures.GetValidDtoWithPackages().Packages.First().Name));
        }
示例#9
0
        public void ThatShapePackageRelationshipIsBiDirectional()
        {
            var package = PackageServices.WithDto(GetPackageDto()).Get();
            var shape   = ShapeServices.WithDto(ShapeTestFixtures.GetValidDtoWithPackages()).Get();

            Assert.AreEqual(shape, package.ShapeSet.First());
        }
示例#10
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));
        }
示例#11
0
        public void ThatShapeIsAssociatedWithRoute()
        {
            var route = RouteServices.WithDto(GetRouteDto()).Get();
            var shape = ShapeServices.WithDto(ShapeTestFixtures.GetValidDtoWithRoutes()).Get();

            var list = new List <IRoute>(shape.Routes);

            Assert.AreEqual(list.Single(p => p.Name == route.Name), route);
        }
示例#12
0
 private IShape GetShape(ShapeDto shape)
 {
     return(ShapeServices.WithDto(shape).Get());
 }
示例#13
0
        public void ThatShapeCanBeGet()
        {
            var shape = ShapeServices.WithDto(ShapeTestFixtures.GetIvFluidDto()).Get();

            Assert.IsNotNull(shape);
        }