/// <summary> /// Configuration of app /// </summary> public void Configuration(IAppBuilder app) { JoinController.Configure(app); MasterController.Configure(app); VotingController.Configure(app); PlayController.Configure(app); }
public void HelloTest() { string testName = "Алена"; string res = VotingController.Hello(testName); Assert.AreEqual("Привет, Алена!", res); }
public async Task Given_NotStartedVoting_When_Start_Then_SameState() { // Arrange and Act var voting = new Voting(); var controller = new VotingController(voting, null); var result = await controller.Start(new string[] { "C#", "F#" }); // Assert Assert.Equal( JsonConvert.SerializeObject(voting.GetState()), JsonConvert.SerializeObject(result)); }
public async Task Given_StartedVoting_When_Vote_Then_SameState() { // Arrange var votingService = new InMemoryVotingService(); var voting = await votingService.Get(); var controller = new VotingController(votingService, null, null); await controller.Start(new string[] { "C#", "F#" }); // Act var result = await controller.Vote("C#"); // Assert Assert.Equal( JsonConvert.SerializeObject(voting.GetState()), JsonConvert.SerializeObject(result)); }