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); }
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 ThatShapeWithUnitGroupsCanBeDeletedLeavingUnitGroups() { var shape = ShapeServices.WithDto(ShapeTestFixtures.GetValidDtoWithUnitGroups()).Get(); ShapeServices.Delete(shape); Assert.IsNotNull(UnitGroupServices.UnitGroups.SingleOrDefault(x => x.Name == ShapeTestFixtures.GetValidDtoWithUnitGroups().UnitGroups.First().Name)); }
public void ThatAddedShapeCanBeFound() { var shape = ShapeServices.WithDto(ShapeTestFixtures.GetIvFluidDto()).Get(); Assert.AreEqual(shape, ShapeServices.Shapes.Single( x => x.Name == shape.Name)); }
public void ThatShapeUnitGroupRelationshipIsBiDirectional() { var unitGroup = UnitGroupServices.WithDto(GetUnitGroupDto()).Get(); var shape = ShapeServices.WithDto(ShapeTestFixtures.GetValidDtoWithUnitGroups()).Get(); Assert.AreEqual(shape, unitGroup.Shapes.First()); }
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); }
public void ThatShapeRouteRelationshipIsBiDirectional() { var route = RouteServices.WithDto(GetRouteDto()).Get(); var shape = ShapeServices.WithDto(ShapeTestFixtures.GetValidDtoWithRoutes()).Get(); Assert.AreEqual(shape, route.ShapeSet.First()); }
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)); }
public void ThatShapePackageRelationshipIsBiDirectional() { var package = PackageServices.WithDto(GetPackageDto()).Get(); var shape = ShapeServices.WithDto(ShapeTestFixtures.GetValidDtoWithPackages()).Get(); Assert.AreEqual(shape, package.ShapeSet.First()); }
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 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); }
private IShape GetShape(ShapeDto shape) { return(ShapeServices.WithDto(shape).Get()); }
public void ThatShapeCanBeGet() { var shape = ShapeServices.WithDto(ShapeTestFixtures.GetIvFluidDto()).Get(); Assert.IsNotNull(shape); }