示例#1
0
        public void SeriesInstanceUID_Setter_AfterGettingHashCode_ThrowsException()
        {
            // Arrange
            var series = new SeriesInfo
            {
                SeriesInstanceUID = new InfoIdentifier("123")
            };

            // Act
            series.GetHashCode();

            // Assert
            Assert.That(() => series.SeriesInstanceUID = new InfoIdentifier("321"), Throws.InvalidOperationException);
        }
示例#2
0
        public void GetHashCode_SeriesWithSameUIDAreNotEqual()
        {
            // Arrange
            var series1 = new SeriesInfo
            {
                SeriesInstanceUID = new InfoIdentifier("123")
            };
            var series2 = new SeriesInfo
            {
                SeriesInstanceUID = new InfoIdentifier("456")
            };
            
            // Act
            var hash1 = series1.GetHashCode();
            var hash2 = series2.GetHashCode();

            // Assert
            Assert.That(hash1, Is.Not.EqualTo(hash2));
        }