示例#1
0
        public void TestHaveRunningType()
        {
            RunningTypeService runningType = new RunningTypeService(Context);
            RunningType        result      = runningType.GetRunningType("01");

            Assert.AreEqual("01", result.Code);
        }
示例#2
0
        public void TestDontHaveRunningType()
        {
            RunningTypeService runningType = new RunningTypeService(Context);
            RunningType        result      = runningType.GetRunningType("02");

            Assert.AreEqual(null, result);
        }
示例#3
0
        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);
        }
示例#4
0
        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();
        }
示例#5
0
        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();
            }
        }
示例#6
0
 public RelayService(string _pbxip, RunningType _runtype) : this(string.Empty, _pbxip, 21007, _runtype)
 {
 }
示例#7
0
 public RelayService(string _pbxip, RunningType _runtype) : this(string.Empty, _pbxip, 21007, _runtype)
 {
 }