public void ThatShapeRouteRelationshipIsBiDirectional() { var route = RouteServices.WithDto(GetRouteDto()).Get(); var shape = ShapeServices.WithDto(ShapeTestFixtures.GetValidDtoWithRoutes()).Get(); Assert.AreEqual(shape, route.ShapeSet.First()); }
public void ThatRouteWithoutAShapeCanBeDeleted() { var route = RouteServices.WithDto(RouteTestFixtures.GetRouteIvDto()).Get(); RouteServices.Delete(route); route = RouteServices.Routes.SingleOrDefault(x => x.Name == route.Name); Assert.IsNull(route); }
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); }
public void ThatRouteCanChangeName() { var route = RouteServices.WithDto(RouteTestFixtures.GetRouteIvDto()).Get(); RouteServices.ChangeRouteName(route, "iv_changed"); Context.CurrentSession().Transaction.Begin(); route = RouteServices.Routes.SingleOrDefault(x => x.Name == "iv_changed"); Assert.IsNotNull(route); }
public void ThatDeletingRouteWithShapeDoesNotDeleteShape() { var route = RouteServices.WithDto(RouteTestFixtures.GetRouteWithShape()).Get(); RouteServices.Delete(route); var shape = ShapeServices.Shapes.SingleOrDefault( x => x.Name == RouteTestFixtures.GetRouteWithShape().Shapes.First().Name); Assert.IsNotNull(shape); }
public void ThatRouteCanBeAssociatedWithShape() { var route = RouteServices.WithDto(RouteTestFixtures.GetRouteWithShape()).Get(); Assert.IsTrue(route.Shapes.Count() == 1); }
public void ThatRouteCanBeFound() { var route = RouteServices.WithDto(RouteTestFixtures.GetRouteIvDto()).Get(); Assert.AreEqual(route, RouteServices.Routes.Single(x => x.Name == route.Name)); }
public void ThatRouteHasAnId() { var route = RouteServices.WithDto(RouteTestFixtures.GetRouteIvDto()).Get(); Assert.IsTrue(route.Id != Guid.Empty); }
public void ThatArouteCanBeGet() { var route = RouteServices.WithDto(RouteTestFixtures.GetRouteIvDto()).Get(); Assert.IsInstanceOfType(route, typeof(Route)); }