Beispiel #1
0
 private Route AssociateShapeWithRoute(Route route)
 {
     _newShape = Shape.Create(new ShapeDto {
         Name = "infusievloeistof"
     });
     _newShape.AddRoute(route);
     return(route);
 }
Beispiel #2
0
        public void NotAcceptTheSameRouteTwice()
        {
            AssociateShapeWithRoute(CreateRoute());
            var route = CreateRoute();

            try
            {
                _newShape.AddRoute(route);
                Assert.Fail("Accepts a duplicate entity");
            }
            catch (Exception e)
            {
                Assert.IsInstanceOfType(e, typeof(DuplicateEntityException <Route>));
            }
            Assert.IsFalse(_newShape.RouteSet.Count() == 2);
        }