public void ShouldPassLedDrawingToDisplayWithSegmentsCorrespondingToInputIndices(char[] input, string[] expected) { //GIVEN var display = Substitute.For <Display>(); var driver = CompositionRoot.CreateDefaultDriver(display); //WHEN driver.Display(input); //THEN display.Received(1).Put(expected); display.Received(0).Put(XArg.IsNotLike(expected)); }
public void ShouldCorrectlyReportUnlikenessWithNSubstitute() { var s = Substitute.For <IXyz>(); s.Do(new List <int>()); var e = Assert.Throws <ReceivedCallsException>(() => { s.Received(1).Do(XArg.IsNotLike(new List <int>())); }); Assert.Throws <ReceivedCallsException>(() => { s.DidNotReceive().Do(XArg.IsNotLike(new List <int> { 1 })); }); }