public BitComparator(IXOr xOr, IAnd and, IOr or, INot not) { _xOr = xOr; _and = and; _or = or; _not = not; }
public Bus1Factory(IAnd and, INot not, IOr or, IByteFactory byteFactory) { _and = and; _not = not; _or = or; _byteFactory = byteFactory; }
public Stepper(IMemoryGateFactory memoryGateFactory, IAnd and, INot not, IOr or) { _and = and; _not = not; _or = or; _memoryGates = Enumerable.Range(0, 12).Select(_ => memoryGateFactory.Create()).ToList(); }
public Bus1(IAnd and, INot not, IOr or, IByteFactory byteFactory, Action <IByte> updateWire) { _and = and; _not = not; _or = or; _byteFactory = byteFactory; _updateWire = updateWire; Input = _byteFactory.Create(0); Output = _byteFactory.Create(0); }
public CpuPinStates( IClock clock, IStepper stepper, IByte instruction, Caez caez, IAnd and, IOr or, INot not, IDecoder decoder, IByteFactory byteFactory) { _clock = clock; _stepper = stepper; _instruction = instruction; _caez = caez; _and = and; _or = or; _not = not; _decoder = decoder; _byteFactory = byteFactory; }
/// <summary> /// Used to test exception messages in the negative /// </summary> /// <param name="continuation">Continuation containing exception message to test</param> /// <param name="test">Custom function to test the message -- return true if the test should pass</param> /// <returns>Another continuation so you can do .And()</returns> public static IStringContainContinuation Matching( this INot <string> continuation, Func <string, bool> test ) { var result = Factory.Create <string, ExceptionMessageContainuationToStringContainContinuation>( null, continuation as IExpectationContext <string> ); continuation.AddMatcher(s => { result.Actual = s; var passed = !test(s); return(new MatcherResult( passed, MessageHelpers.MessageForNotMatchResult( passed, s ) )); }); return(result); }
/// <summary> /// Used to test exception messages in the negative /// </summary> /// <param name="continuation">Continuation containing the exception message</param> /// <param name="search">String to search for</param> /// <returns>Continuation so you can perform more tests on the message</returns> public static IStringContainContinuation Containing( this INot <string> continuation, string search ) { var result = Factory.Create <string, ExceptionMessageContainuationToStringContainContinuation>( null, continuation as IExpectationContext <string> ); continuation.AddMatcher(s => { result.Actual = s; var passed = !s?.Contains(search) ?? true; return(new MatcherResult( passed, MessageHelpers.MessageForNotContainsResult( passed, s, search ) )); }); return(result); }
public Inverter(INot not, IByteFactory byteFactory) { _not = not; _byteFactory = byteFactory; }
public Decoder(INot not, IAnd and) { _not = not; _and = and; }
public Or(INot not, INAnd nAnd) { _not = not; _nAnd = nAnd; }
public IsZeroGate(IOr or, INot not) { _or = or; _not = not; }
public NAnd(INot not, IAnd and) { _not = not; _and = and; }