public void TestHaveRunningType() { RunningTypeService runningType = new RunningTypeService(Context); RunningType result = runningType.GetRunningType("01"); Assert.AreEqual("01", result.Code); }
public void TestDontHaveRunningType() { RunningTypeService runningType = new RunningTypeService(Context); RunningType result = runningType.GetRunningType("02"); Assert.AreEqual(null, result); }
public void Mockdata() { RunningType Type = new RunningType() { Code = "01", Name = "Username", RunningNoFormat = "{0}{1}{2}{3}{4}{5}{6}{7}{8}{9}[RUNNING]", RunningNoDigit = 8, Active = true, CreatedBy = "System", CreatedDate = DateTime.Parse("5/1/2008 8:30:52 AM", System.Globalization.CultureInfo.InvariantCulture) }; RunningTypeService.Setup(r => r.GetRunningType(It.IsAny <string>())).Returns(Type); }
public RelayService(string _dbserver, string _pbxip, int _pbxport, RunningType _runtype) { this.ReadIni(); this.DBServer = _dbserver; this.PBXip = _pbxip; this.PBXport = _pbxport; this.RunType = _runtype; h2 = new HotelHelper2(PBXip, PBXport); h2.PassDevice2PmsEvent += H2_PassDevice2PmsEvent; //CheckRoonetsDB(); if (RunType == RunningType.BOTH || RunType == RunningType.ROONETS) InitTimer(); }
public RelayService(string _dbserver, string _pbxip, int _pbxport, RunningType _runtype) { this.ReadIni(); this.DBServer = _dbserver; this.PBXip = _pbxip; this.PBXport = _pbxport; this.RunType = _runtype; h2 = new HotelHelper2(PBXip, PBXport); h2.PassDevice2PmsEvent += H2_PassDevice2PmsEvent; //CheckRoonetsDB(); if (RunType == RunningType.BOTH || RunType == RunningType.ROONETS) { InitTimer(); } }
public RelayService(string _pbxip, RunningType _runtype) : this(string.Empty, _pbxip, 21007, _runtype) { }