Exemplo n.º 1
0
        // 请求心跳
        public void HeartBeatReq()
        {
            AutoId autoId = new AutoId();

            autoId.Id = 1;
            //Debug.Log("---------------------请求心跳");
            NetCore.Instance.Send(Api.ENetMsgId.heart_beat_req, autoId);
        }
Exemplo n.º 2
0
        public override int GetHashCode()
        {
            var hashCode = 21937253;

            hashCode = hashCode * -1521134295 + ReservationsNr.GetHashCode();
            hashCode = hashCode * -1521134295 + AutoId.GetHashCode();
            hashCode = hashCode * -1521134295 + KundeId.GetHashCode();
            hashCode = hashCode * -1521134295 + From.GetHashCode();
            hashCode = hashCode * -1521134295 + To.GetHashCode();
            return(hashCode);
        }
Exemplo n.º 3
0
        public async void GetNext_Should_Invoke_Repository()
        {
            var service = MoqHelper.CreateWithMocks <AutoIdService>();

            var autoId = new AutoId
            {
                Value = 10ul
            };

            var IAutoIdRepository = Mock.Get(service.IAutoIdRepository);

            IAutoIdRepository
            .Setup(x => x.GetByNameAsync(It.IsAny <string>()))
            .Returns(Task.FromResult(autoId));

            Assert.Equal(11ul, await service.GetNext <DummyEntity>());
            Assert.Equal(12ul, await service.GetNext <DummyEntity>());

            IAutoIdRepository.Verify(x => x.SaveAsync(It.Is <AutoId>(y => y.Value != 0ul)), Times.Exactly(2));
        }
Exemplo n.º 4
0
 public override string ToString()
 {
     return(AutoId.ToString()); // Für bessere Coded UI Test Erkennung
 }
Exemplo n.º 5
0
        // 响应心跳
        public object HeartBeatAck(byte[] data)
        {
            AutoId autoID = AutoId.Parser.ParseFrom(data);

            return(null);
        }