Пример #1
0
        public void Large_result_sets_can_be_returned_using_multiple_pull_requests_set_in_code()
        {
            RegisterBeansForLargeResultSetTests();
            using (INetMXConnector connector = new Jsr262Connector(_serviceUrl, 100))
            {
                connector.Connect(null);
                IMBeanServerConnection remoteServer = connector.MBeanServerConnection;

                Assert.AreEqual(1001, remoteServer.QueryNames(null, null).Count());
            }
        }
Пример #2
0
        public void Large_result_sets_can_be_returned_using_multiple_pull_requests_set_in_code()
        {
            RegisterBeansForLargeResultSetTests();
             using (INetMXConnector connector = new Jsr262Connector(_serviceUrl, 100))
             {
            connector.Connect(null);
            IMBeanServerConnection remoteServer = connector.MBeanServerConnection;

            Assert.AreEqual(1001, remoteServer.QueryNames(null, null).Count());
             }
        }
Пример #3
0
        public void Quoted_object_name_can_be_returned()
        {
            ObjectName firstQuotedName =
            @"com.acme:name=""AgentConnectorDemo"",type=""log4j"",logger=root,appender=ConsoleAppender";
             ObjectName secondQuotedName =
            @"com.acme:applicationType=""AgentConnectorDemo"",name=""TransportHandler"",type=""SoftwareVersion""";
             _server.RegisterMBean(new Sample(), firstQuotedName);
             _server.RegisterMBean(new Sample(), secondQuotedName);

             ObjectName[] names;
             using (INetMXConnector connector = new Jsr262Connector(_serviceUrl, 100))
             {
            connector.Connect(null);
            IMBeanServerConnection remoteServer = connector.MBeanServerConnection;
            names = remoteServer.QueryNames("com.acme:*", null).ToArray();
             }

             Assert.IsTrue(names.Contains(firstQuotedName));
             Assert.IsTrue(names.Contains(secondQuotedName));
        }
Пример #4
0
        public void Quoted_object_name_can_be_returned()
        {
            ObjectName firstQuotedName =
                @"com.acme:name=""AgentConnectorDemo"",type=""log4j"",logger=root,appender=ConsoleAppender";
            ObjectName secondQuotedName =
                @"com.acme:applicationType=""AgentConnectorDemo"",name=""TransportHandler"",type=""SoftwareVersion""";

            _server.RegisterMBean(new Sample(), firstQuotedName);
            _server.RegisterMBean(new Sample(), secondQuotedName);

            ObjectName[] names;
            using (INetMXConnector connector = new Jsr262Connector(_serviceUrl, 100))
            {
                connector.Connect(null);
                IMBeanServerConnection remoteServer = connector.MBeanServerConnection;
                names = remoteServer.QueryNames("com.acme:*", null).ToArray();
            }

            Assert.IsTrue(names.Contains(firstQuotedName));
            Assert.IsTrue(names.Contains(secondQuotedName));
        }