public static void Main() { var db = new NobelPrizeWinnersDbContext(); var winnerService = new WinnerService(db); winnerService.Run(); }
public void Insert_ShouldReturn_NonNull_Boolean() { //Act IWinnerService service = new WinnerService(); bool result = service.Insert(new WinnerDTO()); //Assert Assert.IsInstanceOfType(result, typeof (bool)); }
public void DeleteAll_ShouldReturn_NonNull_Boolean() { using (new TransactionScope()) { //Act IWinnerService service = new WinnerService(); bool result = service.DeleteAll(); //Assert Assert.IsInstanceOfType(result, typeof (bool)); } }
public ReportServiceTest() { _googleSearchRepositoryMockBuilder = new SearchRepositoryMockBuilder(); _bingSearchRepositoryMockBuilder = new SearchRepositoryMockBuilder(); IEnumerable <ISearchRepository> repositories = BuildIEnumerableSearchRepositories(); var searchService = new SearchService(repositories); var winnerservice = new WinnerService(); _reportService = new ReportService(searchService, winnerservice); }
public Service() { Action = new ActionService(); Board = new BoardService(); Language = new LanguageService(); Player = new PlayerService(); Sound = new SoundService(); Storage = new StorageService(); Timer = new TimerService(); Winner = new WinnerService(); }
public void Insert_ShouldReturn_NonNull_Boolean() { using (new TransactionScope()) { //Arrange long attendeeID = new AttendeeService().GetAll()[0].AttendeeID; long sponsorID = new SponsorService().GetAllThatProvidedSwag()[0].SponsorID; long swagID = new SwagService().GetAllBySponsor(sponsorID)[0].SwagID; //Act IWinnerService service = new WinnerService(); bool result = service.Insert(new WinnerDTO {AttendeeID = attendeeID, SponsorID = sponsorID, SwagID = swagID, Name = "Big Winner",}); //Assert Assert.IsInstanceOfType(result, typeof (bool)); } }
public void GivenTwoSearchEnginesAreSet() { _googleSearchEngineRepository = new MockSearchEngineRepository() .SetSearchEngineName("Google") .SetSearchResults(); _bingSearchEngineRepository = new MockSearchEngineRepository() .SetSearchEngineName("Bing") .SetSearchResults(); var searchService = new SearchService(new List <ISearchEngineRepository>() { _googleSearchEngineRepository.Object, _bingSearchEngineRepository.Object }); var winnerService = new WinnerService(); _reportService = new ReportService(searchService, winnerService); }
public void GetWinner_WhenCheckedSquaresAreTheSame_ReturnsTrue(int[] squares) { // Arrange IWinnerService classUnderTest = new WinnerService(); var player = Player.O; var expected = true; var game = new Game(); game.SetPosition(player, squares[0]); game.SetPosition(player, squares[1]); game.SetPosition(player, squares[2]); var currentBoard = game.GetCurrentBoard(); // Act var actual = classUnderTest .GetWinner(currentBoard) .HasWon; // Assert Assert.AreEqual(expected, actual); }
public PickAWinnerController(IHubContext <RaffleHub> raffleHub, WinnerService winnerService) { RaffleHub = raffleHub; WinnerService = winnerService; }
public WinnerServiceTests() { _sut = new WinnerService(); }
public RaffleHub(WinnerService winnerService) { WinnerService = winnerService; }