private static BuildingSecurityClient GetBuildingSecurityClient(ITypedAlarmService alarmService = null,
                                                                 ITypedSessionManagement sessionService = null,
                                                                 ITypedSystemInformationService systemInformationService = null,
                                                                 ITypedApplicationPreference applicationPreferenceService = null,
                                                                 IDataSerializerFactory serializationFactory = null)
 {
     return new BuildingSecurityClient(alarmService ?? new Mock<ITypedAlarmService>().Object,
                                       sessionService ?? new Mock<ITypedSessionManagement>().Object,
                                       systemInformationService ?? new Mock<ITypedSystemInformationService>().Object,
                                       applicationPreferenceService ?? new Mock<ITypedApplicationPreference>().Object,
                                       serializationFactory ?? new DataSerializerFactory());
 }
Esempio n. 2
0
 public void Login()
 {
    _sessionManagement = new SessionManagementService(_config.PegasysUrl);
    P2000LoginReply p2000LoginReply = _sessionManagement.P2000Login(_config.ValidSuperUserName, _config.ValidSuperUserPassword);
     _config.SessionGuid = p2000LoginReply.SessionInfo.SessionGuid;
 }
 public void TestInitialize()
 {
     _config = new Configuration();
     _sessionManagementService = new SessionManagementService(_config.PegasysUrl);
 }