1 // Copyright 2003-2004 DigitalCraftsmen - http://www.digitalcraftsmen.com.br/
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
7 // http://www.apache.org/licenses/LICENSE-2.0
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
15 namespace Castle
.ManagementExtensions
.Test
18 using System
.Runtime
.Remoting
;
20 using NUnit
.Framework
;
22 using Castle
.ManagementExtensions
;
25 /// Summary description for MServerFactoryTestCase.
28 public class MServerFactoryTestCase
: Assertion
30 public MServerFactoryTestCase()
35 public void MBeanInstantiation()
37 MServer server
= null;
41 server
= MServerFactory
.CreateServer(false);
42 AssertNotNull(server
);
43 Assert( !RemotingServices
.IsTransparentProxy(server
) );
47 MServerFactory
.Release(server
);
52 public void MBeanInstantiationWithinAppDomain()
54 MServer server
= null;
58 server
= MServerFactory
.CreateServer(true);
59 AssertNotNull(server
);
60 Assert( RemotingServices
.IsTransparentProxy(server
) );
64 MServerFactory
.Release(server
);