

ConnectionOdbcSdk
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 |
using System; using Cisco.UnityConnection.OdbcSdk; namespace CliTestProject { class Program { private static UnityConnectionServerOdbcSdk _server; static void Main() { Console.WriteLine("Starting tests"); LogIn(); RunTests(); Console.WriteLine("Press enter to exit"); Console.ReadLine(); } private static void LogIn() { _server = new UnityConnectionServerOdbcSdk("TestAppName"); var res = _server.LoginDatabaseBlocking("192.168.0.178","CCMAdministrator", "ecsbulab" ); if (res.Successful == false) { Console.WriteLine(res); return; } _server.ErrorEvents += ServerOnErrorEvents; Console.WriteLine(_server.ToString()); } private static void ServerOnErrorEvents(object sender, LogEventArgs logEventArgs) { Console.WriteLine("[ERROR] "+logEventArgs.Line); } private static void RunTests() { if (_server == null || _server.ServerConnectionStatus != ConnectionStatus.Connected) { return; } bool temp= _server.ConnectionConversationNameExists("SubSignIn"); Console.WriteLine(temp); Console.WriteLine("Neighbor count=" + _server.NeighborLocations.Count); Console.WriteLine("version is greater than 9.0.0 =" + _server.IsConnectionVersionAtLeast(9, 0, 0, 0)); Console.WriteLine("version is greater than 10.5.0 =" + _server.IsConnectionVersionAtLeast(10, 5, 0, 0)); Console.WriteLine("1033 installed "+_server.IsLanguageInstalled(1033)); Console.WriteLine("1066 installed " + _server.IsLanguageInstalled(1066)); Console.WriteLine("ENU installed " + _server.IsLanguageInstalled("ENU")); Console.WriteLine("XXX installed " + _server.IsLanguageInstalled("XXX")); _server.LargeDbOperationPause(true); Console.WriteLine("Primary location display name:" + _server.PrimaryLocationDisplayName); Console.WriteLine("Primary location domain name:" + _server.PrimaryLocationDomainName); Console.WriteLine("Primary location objectId:" + _server.PrimaryLocationObjectId); Console.WriteLine("Primary location server address:" + _server.PrimaryLocationServerAddress); var res=_server.UpdateStatisticsForMailstore("UnityMbxDb2"); if (res.Successful == false) { Console.WriteLine("Failure updating statistics:"+res); } res = _server.UpdateStatisticsForMailstore("Junk"); if (res.Successful == false) { Console.WriteLine("Failure updating statistics:" + res); } if (_server.ChangeActiveDatabase("junk") == false) { Console.WriteLine("Failed changing DB to junk"); } Console.WriteLine("Current database name ="+_server.CurrentDatabaseName); if (_server.ChangeActiveDatabase("UnityDynDb") == false) { Console.WriteLine("Failed changing DB to UnityDynDb"); } Console.WriteLine("Current database name =" + _server.CurrentDatabaseName); if (_server.ChangeActiveDatabase("UnityDirDb") == false) { Console.WriteLine("Failed changing DB to UnityDynDb"); } Console.WriteLine("Current database name =" + _server.CurrentDatabaseName); Console.WriteLine("Default language=" + _server.GetDefaultLanguage()); _server.LogoutBlocking(); } } } |
Commits for ConnectionOdbcSdk/trunk/CliTestProject/Program.cs
Revision | Author | Commited | Message |
---|---|---|---|
21
![]() |
![]() |
Wed 08 Jan, 2014 01:22:54 +0000 | Final rework of framework – simplified class structure to remove seperate DBFunctions reference and have all items under the UnityConnectionServerOdbcSdk service which uses pass through calls to the DB specific methods so clients have just a single class instance to deal with. |
20
![]() |
![]() |
Tue 07 Jan, 2014 03:22:54 +0000 | Finished basic reorg of interface/class structure to optimize for unit test construction. |
19
![]() |
![]() |
Mon 06 Jan, 2014 22:26:38 +0000 | renaming and reorganizing unit tests a bit. |
15
![]() |
![]() |
Sun 08 Sep, 2013 17:27:35 +0000 | 2.0.3 |
8
![]() |
![]() |
Fri 30 Aug, 2013 00:27:58 +0000 | adding some unit/integration tests into the project, doing a little cleanup. |
7
![]() |
![]() |
Thu 29 Aug, 2013 00:02:27 +0000 | working on cleaning up the ODBC sdk project |
6
![]() |
![]() |
Wed 10 Jul, 2013 20:55:47 +0000 | cleaning up some code, adding comments and working on naming conventions a bit. |
4 |
![]() |
Sat 01 Jun, 2013 02:52:17 +0000 | reworking project structure and naming |