コード例 #1
0
 public void Next_WithOneSource_ReturnsDifferentGuids()
 {
     GuidSource source = new GuidSource();
     var value1 = source.Next(null);
     var value2 = source.Next(null);
     Assert.AreNotEqual(value1, value2);
 }
コード例 #2
0
        public void Next_WithOneSource_ReturnsDifferentGuids()
        {
            GuidSource source = new GuidSource();
            var        value1 = source.Next(null);
            var        value2 = source.Next(null);

            Assert.AreNotEqual(value1, value2);
        }
コード例 #3
0
        public void Next_Returns_A_Guid()
        {
            GuidSource source = new GuidSource();
            var        value  = source.Next(null);

            Assert.IsFalse(value.CompareTo(Guid.Empty) == 0);
        }
コード例 #4
0
        public static PacketDto Create(Guid sender, Guid receiver, MessageDto message, bool reliable) => new PacketDto
        {
//         Id = Guid.NewGuid(),
            Id         = GuidSource.Next(),
            SenderId   = sender,
            ReceiverId = receiver,
            Message    = message,
            Flags      = reliable ? PacketFlags.Reliable : PacketFlags.None
        };
コード例 #5
0
        public void Next_WithTwoSources_Returns_RepeatedGuids()
        {
            GuidSource source1 = new GuidSource();
            var        value1  = source1.Next(null);

            GuidSource source2 = new GuidSource();
            var        value2  = source2.Next(null);

            Assert.AreEqual(value1, value2);
        }
コード例 #6
0
        public void Next_WithTwoSources_Returns_RepeatedGuids()
        {
            GuidSource source1 = new GuidSource();
            var value1 = source1.Next(null);

            GuidSource source2 = new GuidSource();
            var value2 = source2.Next(null);

            Assert.AreEqual(value1, value2);
        }
コード例 #7
0
 public void Next_Returns_A_Guid()
 {
     GuidSource source = new GuidSource();
     var value = source.Next(null);
     Assert.IsFalse(value.CompareTo(Guid.Empty) == 0);
 }