public void Constructor_Throws_ArgumentException_When_Identifier_Too_Long()
 {
     ArgumentTester.ThrowsArgumentException(
         () => new EntityIdentifier(new string(
                                        'a', EntityIdentifier.MaxLength + 1)),
         "identifier");
 }
        public void EntityTypeGarbageCollectionBehavior_Throws_ArgumentException_When_EntityTypeId_Empty()
        {
            var context = new Mock <IDeploymentContext>();

            ArgumentTester.ThrowsArgumentException(
                () => context.Object.EntityTypeGarbageCollectionBehavior(
                    Guid.Empty, GarbageCollectionBehavior.DeleteAll),
                "entityTypeId");
        }
        public void EntityTypeOrphanMappingBehavior_Throws_ArgumentException_When_EntityTypeId_Empty()
        {
            var context = new Mock <IDeploymentContext>();

            ArgumentTester.ThrowsArgumentException(
                () => context.Object.EntityTypeOrphanMappingBehavior(
                    Guid.Empty, OrphanMappingBehavior.Remove),
                "entityTypeId");
        }
        public void DestinationSystemOrphanMappingBehavior_Throws_ArgumentException_When_DestinationSystemId_Empty()
        {
            var context = new Mock <IDeploymentContext>();

            ArgumentTester.ThrowsArgumentException(
                () => context.Object.DestinationSystemOrphanMappingBehavior(
                    Guid.Empty, OrphanMappingBehavior.Remove),
                "destinationSystemId");
        }
        public void DestinationSystemGarbageCollectionBehavior_Throws_ArgumentException_When_DestinationSystemId_Empty()
        {
            var context = new Mock <IDeploymentContext>();

            ArgumentTester.ThrowsArgumentException(
                () => context.Object.DestinationSystemGarbageCollectionBehavior(
                    Guid.Empty, GarbageCollectionBehavior.DeleteMapped),
                "destinationSystemId");
        }
        public void OrphanMappingBehavior_Throws_ArgumentException_When_SourceSystemId_Empty()
        {
            var context = new Mock <IDeploymentContext>();

            ArgumentTester.ThrowsArgumentException(
                () => context.Object.OrphanMappingBehavior(
                    Guid.NewGuid(), Guid.Empty, OrphanMappingBehavior.Deactivate),
                "sourceSystemId");
        }
        private void EntityTypeGarbageCollectionBehaviorThrowsArgumentExceptionWhenBehaviorInvalid(
            GarbageCollectionBehavior invalidBehavior)
        {
            var context = new Mock <IDeploymentContext>();

            ArgumentTester.ThrowsArgumentException(
                () => context.Object.EntityTypeGarbageCollectionBehavior(
                    Guid.NewGuid(), invalidBehavior),
                "behavior");
        }
        private void OrphanMappingBehaviorThrowsArgumentExceptionWhenBehaviorInvalid(
            OrphanMappingBehavior invalidBehavior)
        {
            var context = new Mock <IDeploymentContext>();

            ArgumentTester.ThrowsArgumentException(
                () => context.Object.OrphanMappingBehavior(
                    Guid.NewGuid(), Guid.NewGuid(), invalidBehavior),
                "behavior");
        }
Beispiel #9
0
 public void Constructor_Throws_Argument_Exception_When_Weight_Invalid()
 {
     ArgumentTester.ThrowsArgumentException(
         () => new Duplicate(1, (MatchWeight)57),
         "weight");
 }