public void CannotDetachTrailerTwice() { var trailerHook = new TrailerHook(); Assert.Throws <DomainRuleViolatedException>(() => { trailerHook.DetachTrailer(); trailerHook.DetachTrailer(); }); }
public void DetachingTrailerResultsInEvent() { var trailerHook = new TrailerHook(); trailerHook.AttachTrailer(); var events = trailerHook.DetachTrailer(); Assert.True(events.Any(x => x is TrailerHookStoppedBeingOccupied)); }