예제 #1
0
        public void An_Id_has_an_unique_HASHCODE()
        {
            SerialIdGenerator idgen = new SerialIdGenerator();

            Id newId1 = idgen.GenerateId();
            Id newId2 = idgen.GenerateId();

            Assert.IsTrue(newId1.GetHashCode() != newId2.GetHashCode());
        }
예제 #2
0
        public void An_Id_is_unique()
        {
            SerialIdGenerator idgen = new SerialIdGenerator();

            Id newId1 = idgen.GenerateId();
            Id newId2 = idgen.GenerateId();

            Assert.IsFalse(newId1.Equals(newId2));
        }
예제 #3
0
        public void An_Id_has_a_HASHCODE()
        {
            SerialIdGenerator idgen = new SerialIdGenerator();

            Id newId1 = idgen.GenerateId();

            Assert.IsNotNull(newId1.GetHashCode());
        }
예제 #4
0
        public void create_a_valid_Id()
        {
            SerialIdGenerator idgen = new SerialIdGenerator();

            Id newId = idgen.GenerateId();

            Assert.IsTrue(newId.IsValid);
        }
예제 #5
0
        public void create_an_Id()
        {
            SerialIdGenerator idgen = new SerialIdGenerator();

            Assert.IsNotNull(idgen.GenerateId());
        }