public void DeepClone_Works()
        {
            // Arrange
            var sut = new BackendPartitioningOptions
            {
                PartitionCount        = 10,
                PartitionKeyExtractor = "Header('x-ms-org-id')",
                PartitioningAlgorithm = "alg1",
            };

            // Act
            var clone = sut.DeepClone();

            // Assert
            Assert.NotSame(sut, clone);
            Assert.Equal(sut.PartitionCount, clone.PartitionCount);
            Assert.Equal(sut.PartitionKeyExtractor, clone.PartitionKeyExtractor);
            Assert.Equal(sut.PartitioningAlgorithm, clone.PartitioningAlgorithm);
        }
Example #2
0
        public void DeepClone_Works()
        {
            // Arrange
            var sut = new BackendPartitioningOptions
            {
                PartitionCount        = 10,
                PartitionKeyExtractor = "Header('x-ms-org-id')",
                PartitioningAlgorithm = "alg1",
            };

            // Act
            var clone = sut.DeepClone();

            // Assert
            clone.Should().NotBeSameAs(sut);
            clone.PartitionCount.Should().Be(sut.PartitionCount);
            clone.PartitionKeyExtractor.Should().Be(sut.PartitionKeyExtractor);
            clone.PartitioningAlgorithm.Should().Be(sut.PartitioningAlgorithm);
        }