Esempio n. 1
0
        public void GetHashCode_EqualNonEmptyOptions()
        {
            _options1 = new ProxyGenerationOptions();
            _options2 = new ProxyGenerationOptions();

            _options1.BaseTypeForInterfaceProxy = typeof(IConvertible);
            _options2.BaseTypeForInterfaceProxy = typeof(IConvertible);

            SimpleMixin mixin = new SimpleMixin();

            _options1.AddMixinInstance(mixin);
            _options2.AddMixinInstance(mixin);


            IProxyGenerationHook hook = new AllMethodsHook();

            _options1.Hook = hook;
            _options2.Hook = hook;

            IInterceptorSelector selector = new AllInterceptorSelector();

            _options1.Selector = selector;
            _options2.Selector = selector;

            Assert.AreEqual(_options1.GetHashCode(), _options2.GetHashCode());
        }
		public void Equals_EqualNonEmptyOptions()
		{
			_options1 = new ProxyGenerationOptions();
			_options2 = new ProxyGenerationOptions();

			_options1.BaseTypeForInterfaceProxy = typeof (IConvertible);
			_options2.BaseTypeForInterfaceProxy = typeof (IConvertible);

			SimpleMixin mixin = new SimpleMixin();
			_options1.AddMixinInstance(mixin);
			_options2.AddMixinInstance(mixin);

			IProxyGenerationHook hook = new AllMethodsHook();
			_options1.Hook = hook;
			_options2.Hook = hook;

			IInterceptorSelector selector = new AllInterceptorSelector();
			_options1.Selector = selector;
			_options2.Selector = selector;

			Assert.AreEqual(_options1, _options2);
		}