Ejemplo n.º 1
0
        public void Obsolete_Generate_ReturnsValidUid(string name)
        {
            var uid = DicomUID.Generate(name);

            Assert.True(DicomUID.IsValid(uid.UID));
            Assert.True(uid.UID.Length <= 64); // Currently not checked by DicomUID.IsValid
        }
Ejemplo n.º 2
0
        public void Generate_ReturnsValidUid()
        {
            var uid = DicomUID.Generate();

            Assert.True(DicomUID.IsValid(uid.UID));
            Assert.True(uid.UID.Length <= 64); // Currently not checked by DicomUID.IsValid
        }
Ejemplo n.º 3
0
        public void Generate_ReturnsDifferentUidsEachTime()
        {
            // Note: it is statistically not possible to verify that all returned Uids
            // are unique in a unit test. Just verify that 2 calls result in 2 different values.
            var uidA = DicomUID.Generate();
            var uidB = DicomUID.Generate();

            Assert.NotEqual(uidA, uidB);
        }