// 请求心跳 public void HeartBeatReq() { AutoId autoId = new AutoId(); autoId.Id = 1; //Debug.Log("---------------------请求心跳"); NetCore.Instance.Send(Api.ENetMsgId.heart_beat_req, autoId); }
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); }
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)); }
public override string ToString() { return(AutoId.ToString()); // Für bessere Coded UI Test Erkennung }
// 响应心跳 public object HeartBeatAck(byte[] data) { AutoId autoID = AutoId.Parser.ParseFrom(data); return(null); }