/// <exception cref="System.Exception"></exception> public virtual void TestActivatorIsUnboundUponClose() { MockActivatable mock = StoreNewMock(); Reopen(); AssertBindUnbindCalls(mock); }
private MockActivatable StoreNewMock() { MockActivatable mock = new MockActivatable(); Store(mock); return(mock); }
private void AssertSingleBindCall(MockActivatable mock) { mock.Recorder().Verify(new[] { new MethodCall("bind", new[] { MethodCall .IgnoredArgument }) }); }
private void AssertBindUnbindCalls(MockActivatable mock) { mock.Recorder().Verify(new[] { new MethodCall("bind", new[] { MethodCall .IgnoredArgument }), new MethodCall("bind", new object[] { null }) }); }
private void AssertBindUnbindCalls(MockActivatable mock) { mock.Recorder().Verify(new[] { new MethodCall("bind", new[] { MethodCall .IgnoredArgument }), new MethodCall("bind", new object[] {null}) }); }
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() }) }); }
private void AssertSingleBindCall(MockActivatable mock) { mock.Recorder().Verify(new MethodCall[] { new MethodCall("bind", new object[] { MethodCall .IgnoredArgument }) }); }
private MockActivatable StoreNewMock() { MockActivatable mock = new MockActivatable(); Store(mock); return mock; }
public virtual void TestActivatorIsBoundUponStore() { MockActivatable mock = StoreNewMock(); AssertSingleBindCall(mock); }