public void ChangeActive_NewActiveValueGiven_ActiveChangedPassiveStaysSame(DestinationHealth oldActive, DestinationHealth newActive) { var compositeHealth = new CompositeDestinationHealth(DestinationHealth.Healthy, oldActive); compositeHealth = compositeHealth.ChangeActive(newActive); Assert.Equal(newActive, compositeHealth.Active); Assert.Equal(DestinationHealth.Healthy, compositeHealth.Passive); }
public DestinationDynamicState(CompositeDestinationHealth health) { Health = health; }
public void Current_CalculatedAsBooleanOrOfActiveAndPassiveStates(DestinationHealth passive, DestinationHealth active, DestinationHealth expectedCurrent) { var compositeHealth = new CompositeDestinationHealth(passive, active); Assert.Equal(expectedCurrent, compositeHealth.Current); }