public void Setup() { min = 1; max = 20; fizzBuzz = new FizzBuzz(); strResult = "1 2 Lucky 4 Buzz Fizz 7 8 Fizz Buzz 11 Fizz Lucky 14 FizzBuzz 16 17 Fizz 19 Buzz"; }
private static Task DoClientWork(IClusterClient client) { // example of calling grains from the initialized client IFizzBuzz fizzBuzz = client.GetGrain <IFizzBuzz>(0); const int numberOfCallsToMake = 10000; var valueList = new (int testValue, int threadId, string evalulation)[numberOfCallsToMake];
public void BeforeAll() { _ioc.Register<IFizzBuzz,FizzBuzz>(); _sut = _ioc.Resolve<IFizzBuzz>(); for (int i = 1; i <= 15; i++) { _result[i - 1] = _sut.Print(); } }
private static void CachedFizzBuzz(FizzBuzzSolver fb) { var fizzbuzzArray = new IFizzBuzz[fb.FizzBuzz]; for (int i = 0; i < fb.FizzBuzz - 1; i++) { int s = i + 1; if (s % fb.Fizz == 0) { fizzbuzzArray[i] = new Fizz(); Console.WriteLine("Fizz"); } else if (s % fb.Buzz == 0) { fizzbuzzArray[i] = new Buzz(); Console.WriteLine("Buzz"); } else { fizzbuzzArray[i] = new NullFizzBuzz(); Console.WriteLine(s); } } fizzbuzzArray[fb.FizzBuzz - 1] = new FizzBuzz(); Console.WriteLine("FizzBuzz"); NullFizzBuzz.value = fb.FizzBuzz; for (int j = 1; j < fb.Quotient; j++) { for (int i = 0; i < fb.FizzBuzz; i++) { NullFizzBuzz.value++; Console.WriteLine(fizzbuzzArray[i]); } } for (int i = 0; i < fb.Remainder; i++) { NullFizzBuzz.value++; Console.WriteLine(fizzbuzzArray[i]); } }
public void LoadContext() { mockDay = new Mock <INameOfDay>(); buzz = new Buzz(mockDay.Object); }
public Domain(IParser parser, IValidator validator, IFizzBuzz fizzBuzz) { _parser = parser; _validator = validator; _fizzBuzz = fizzBuzz; }
public Task <string> GetFizzBuzz(int value) { IFizzBuzz fizzBuzz = _clusterClient.GetGrain <IFizzBuzz>(0); return(fizzBuzz.Evaluate(value)); }
public FizzBuzzController(IFizzBuzz fizzBuzz) => _fizzbuzz = fizzBuzz;
public void Setup() { _fizzBuzz = new FizzBuzz(); }
public Player(IFizzBuzz fizzBuzz) { _fizzBuzz = fizzBuzz; }
public DisplayFizz(IFizzBuzz fizzBuzzHandlerService) { _fizzBuzzHandler = fizzBuzzHandlerService; }
public FizzBuzzController(IFizzBuzz fizzBuzz) { _fb = fizzBuzz; }
public void Push(IFizzBuzz fizzbuzz) { _fizzbuzz.Add(fizzbuzz); }
public FizzBuzzPrinter(ILinePrinter printer, IFizzBuzz fizzBuzz) { _printer = printer; _fizzBuzz = fizzBuzz; }
public FizzBuzzTest() { _stringWriter = new StringWriter(new StringBuilder()); _fizzBuzz = new FizzBuzz(_stringWriter); }