public void AttachingDetachedEntitySucceeds()
        {
            // Arrange
            var svc = new biz.dfch.CS.Appclusive.Api.Core.Core(new Uri("http://localhost"));
            var entity = new Node();
            Mock.Arrange(() => svc.AttachTo(Arg.AnyString, Arg.AnyObject)).OccursOnce();

            // Act
            svc.AttachIfNeeded(entity);

            // Assert
            Mock.Assert(svc);
        }
        public void AttachingEntityToInvalidEntitySetThrowsException()
        {
            // Arrange
            var svc = new biz.dfch.CS.Appclusive.Api.Core.Core(new Uri("http://localhost"));
            var entity = new Node();
            var entitySetName = "InvalidEntitySetName";
            Mock.Arrange(() => svc.AttachTo(Arg.AnyString, Arg.AnyObject)).OccursOnce();

            // Act
            svc.AttachIfNeeded(entitySetName, entity);

            // Assert
            Mock.Assert(svc);
        }
        public void AttachingDetachedEntitySucceeds()
        {
            // Arrange
            var svc    = new biz.dfch.CS.Appclusive.Api.Core.Core(new Uri("http://localhost"));
            var entity = new Node();

            Mock.Arrange(() => svc.AttachTo(Arg.AnyString, Arg.AnyObject)).OccursOnce();

            // Act
            svc.AttachIfNeeded(entity);

            // Assert
            Mock.Assert(svc);
        }
        public void AttachingEntityToInvalidEntitySetThrowsException()
        {
            // Arrange
            var svc           = new biz.dfch.CS.Appclusive.Api.Core.Core(new Uri("http://localhost"));
            var entity        = new Node();
            var entitySetName = "InvalidEntitySetName";

            Mock.Arrange(() => svc.AttachTo(Arg.AnyString, Arg.AnyObject)).OccursOnce();

            // Act
            svc.AttachIfNeeded(entitySetName, entity);

            // Assert
            Mock.Assert(svc);
        }