public void Create_ReturnsInstance_WhenCalled() { // Arrange var sut = new CircleOfPeopleFactory(); // Act ICircleOfPeople actual = sut.Create(3); // Assert Assert.NotNull(actual); }
public void Run(int numberOfPeopleStandingInACircle, int numberOfPeopleToCountOverEachTime) { var factory = new CircleOfPeopleFactory(); var circle = new Circle(factory); IEnumerable <int> result = circle.Run(numberOfPeopleStandingInACircle, numberOfPeopleToCountOverEachTime).ToArray(); int winner = result.Last(); System.Console.WriteLine("The sequence of children as they are eliminated: {0}", m_Helper.ArrayToString(result)); System.Console.WriteLine("The id of the winning child: {0}", winner); }
private Circle CreateSut() { var factory = new CircleOfPeopleFactory(); return(new Circle(factory)); }