コード例 #1
0
        public void BatchSyncConfigurationsWithDuplicateSyncListsThrowsException()
        {
            var syncConfigurations = new BatchSyncConfigurations();

            syncConfigurations.BatchSyncListsOrder.Order[0] = BatchSyncListType.ItemsInDestinationOnly;
            syncConfigurations.BatchSyncListsOrder.Order[1] = BatchSyncListType.ItemsInDestinationOnly;

            Action act = () => syncConfigurations.Validate();

            act.Should().Throw <ArgumentException>().WithMessage($"Cannot have duplicates in the {nameof(syncConfigurations.BatchSyncListsOrder)} array.");
        }
コード例 #2
0
        public void BatchSyncConfigurationsWithDuplicateSyncOperationsThrowsException()
        {
            var syncConfigurations = new BatchSyncConfigurations();

            syncConfigurations.SyncOperationsOrder.Order[0] = SyncOperationType.Insert;
            syncConfigurations.SyncOperationsOrder.Order[1] = SyncOperationType.Insert;

            Action act = () => syncConfigurations.Validate();

            act.Should().Throw <ArgumentException>().WithMessage($"Cannot have duplicates in the {nameof(syncConfigurations.SyncOperationsOrder)} array.");
        }