public void ShouldCloseInvisibleKompas() { var kompasMock = new Mock <KompasObject>(); kompasMock.Setup(mock => mock.Visible).Returns(false); var wrapper = new KompasWrapper(); SetPrivateField(wrapper, "_kompas", kompasMock.Object); wrapper.CloseInvisible(); kompasMock.Verify(mock => mock.Quit()); }
private void BladeBuilderForm_FormClosed(object sender, FormClosedEventArgs e) { _kompas.CloseInvisible(); }