public void ShouldAllowTheFailureToFindHandlerToBeSet() { var container = new MyContainer(); var complained = true; container.HandlerForFailingToFind = (s) => complained = true; container.Find<ComboBox>("Wibble"); Assert.True(complained, "Should have handled failure to find using the given handler"); }
public void ShouldAllowTheFailureToFindHandlerToBeSet() { var container = new MyContainer(); var complained = true; container.HandlerForFailingToFind = (s) => complained = true; container.Find <ComboBox>("Wibble"); Assert.True(complained, "Should have handled failure to find using the given handler"); }
public void ShouldHandleFailureToFindAComponentByThrowingAnExceptionByDefault() { var container = new MyContainer(); try { container.Find<ComboBox>("Wibble"); Assert.Fail("Should have thrown an exception"); } catch(FailureToFindException) { } }
public void ShouldHandleFailureToFindAComponentByThrowingAnExceptionByDefault() { var container = new MyContainer(); try { container.Find <ComboBox>("Wibble"); Assert.Fail("Should have thrown an exception"); } catch (FailureToFindException) { } }