Пример #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)
 {
 }