GetMethodTable() public method

Get a list of all methods available.
public GetMethodTable ( ) : IAsyncResult
return IAsyncResult
        public void GetMethodTableCallTest()
        {
            // ARRANGE
            using (AutoResetEvent waitEvent = new AutoResetEvent(false))
            {
                ResultEventArgs<MethodTable> result = null;
                IServerService serverService = new ServerService(new EtsyContext(NetsyData.EtsyApiKey));
                serverService.GetMethodTableCompleted += (s, e) =>
                {
                    result = e;
                    waitEvent.Set();
                };

                // ACT
                serverService.GetMethodTable();
                bool signalled = waitEvent.WaitOne(Constants.WaitTimeout);

                // ASSERT
                // check that the event was fired, did not time out
                Assert.IsTrue(signalled, "Not signalled");

                // check the data
                Assert.IsNotNull(result);
                TestHelpers.CheckResultSuccess(result);

                Assert.IsTrue(result.ResultValue.Count > 1);
                Assert.IsTrue(result.ResultValue.Results.Length > 1);
                Assert.IsNull(result.ResultValue.Params);
            }
        }
        public void GetMethodTableApiKeyInvalidTest()
        {
            // ARRANGE
            using (AutoResetEvent waitEvent = new AutoResetEvent(false))
            {
                ResultEventArgs<MethodTable> result = null;
                IServerService serverService = new ServerService(new EtsyContext("InvalidKey"));
                serverService.GetMethodTableCompleted += (s, e) =>
                {
                    result = e;
                    waitEvent.Set();
                };

                // ACT
                serverService.GetMethodTable();
                bool signalled = waitEvent.WaitOne(Constants.WaitTimeout);

                // ASSERT
                // check that the event was fired, did not time out
                Assert.IsTrue(signalled, "Not signalled");

                // check the data - should fail
                Assert.IsNotNull(result);
                Assert.IsNotNull(result.ResultStatus);
                Assert.IsFalse(result.ResultStatus.Success);
                Assert.AreEqual(WebExceptionStatus.ProtocolError, result.ResultStatus.WebStatus);
            }
        }