예제 #1
0
        /// <exception cref="System.Exception"></exception>
        public virtual void TestActivatorIsUnboundUponClose()
        {
            MockActivatable mock = StoreNewMock();

            Reopen();
            AssertBindUnbindCalls(mock);
        }
예제 #2
0
        private MockActivatable StoreNewMock()
        {
            MockActivatable mock = new MockActivatable();

            Store(mock);
            return(mock);
        }
예제 #3
0
 private void AssertSingleBindCall(MockActivatable mock)
 {
     mock.Recorder().Verify(new[]
     {
         new MethodCall("bind", new[]
         {
             MethodCall
             .IgnoredArgument
         })
     });
 }
예제 #4
0
 private void AssertBindUnbindCalls(MockActivatable mock)
 {
     mock.Recorder().Verify(new[]
     {
         new MethodCall("bind", new[]
         {
             MethodCall
             .IgnoredArgument
         }),
         new MethodCall("bind", new object[] { null })
     });
 }
예제 #5
0
 private void AssertBindUnbindCalls(MockActivatable mock)
 {
     mock.Recorder().Verify(new[]
     {
         new MethodCall("bind", new[]
         {
             MethodCall
                 .IgnoredArgument
         }),
         new MethodCall("bind", new object[] {null})
     });
 }
예제 #6
0
        public virtual void TestUnbindingIsIsolated()
        {
            if (!IsMultiSession())
            {
                return;
            }
            MockActivatable mock1 = StoreNewMock();

            Db().Commit();
            MockActivatable mock2 = RetrieveMockFromNewClientAndClose();

            AssertBindUnbindCalls(mock2);
            // mock1 has only be bound by store so far
            // client.close should have no effect on it
            mock1.Recorder().Verify(new MethodCall[] { new MethodCall("bind", new object[] {
                    new _IArgumentCondition_50()
                }) });
        }
예제 #7
0
		private void AssertSingleBindCall(MockActivatable mock)
		{
			mock.Recorder().Verify(new MethodCall[] { new MethodCall("bind", new object[] { MethodCall
				.IgnoredArgument }) });
		}
예제 #8
0
		private MockActivatable StoreNewMock()
		{
			MockActivatable mock = new MockActivatable();
			Store(mock);
			return mock;
		}
예제 #9
0
        public virtual void TestActivatorIsBoundUponStore()
        {
            MockActivatable mock = StoreNewMock();

            AssertSingleBindCall(mock);
        }