public virtual void testRegisterUserProcessor()
        {
            UserProcessor userProcessor = new SimpleServerUserProcessor();

            UserProcessorRegisterHelper.registerUserProcessor(userProcessor, userProcessors);
            Assert.Single(userProcessors);
        }
        public virtual void testRegisterMultiInterestUserProcessor()
        {
            UserProcessor multiInterestUserProcessor = new SimpleServerMultiInterestUserProcessor();

            UserProcessorRegisterHelper.registerUserProcessor(multiInterestUserProcessor, userProcessors);
            Assert.Equal(((SimpleServerMultiInterestUserProcessor)multiInterestUserProcessor).multiInterest().Count, userProcessors.Count);
        }
        public virtual void testInterestEmptyException()
        {
            MultiInterestUserProcessor userProcessor = new SyncMutiInterestUserProcessorAnonymousInnerClass(this);

            try
            {
                UserProcessorRegisterHelper.registerUserProcessor(userProcessor, userProcessors);
            }
            catch (Exception)
            {
            }

            Assert.Empty(userProcessors);
        }
        public virtual void testInterestRepeatException()
        {
            UserProcessor userProcessor         = new SimpleServerUserProcessor();
            UserProcessor repeatedUserProcessor = new SimpleServerUserProcessor();

            try
            {
                UserProcessorRegisterHelper.registerUserProcessor(userProcessor, userProcessors);
                UserProcessorRegisterHelper.registerUserProcessor(repeatedUserProcessor, userProcessors);
            }
            catch (Exception)
            {
            }

            Assert.Single(userProcessors);
        }
Beispiel #5
0
 /// <summary>
 /// Use UserProcessorRegisterHelper<seealso cref="UserProcessorRegisterHelper"/> to help register user processor for server side.
 /// </summary>
 /// <seealso cref= AbstractRemotingServer#registerUserProcessor(rpc.protocol.UserProcessor) </seealso>
 public override void registerUserProcessor(UserProcessor processor)
 {
     UserProcessorRegisterHelper.registerUserProcessor(processor, userProcessors);
 }