public void SetUp() { _crossConnectivityFake = new CrossConnectivityFake(); _backendServiceMock = new Mock <IBackendService>(); _sut = new LoginViewModel(_backendServiceMock.Object); Connectivity.Instance = _crossConnectivityFake; }
public void SetUp() { _crossConnectivityFake = new CrossConnectivityFake(); _backendServiceMock = new Mock <IBackendService>(); _allRounds = GenerateRoundsList(); _backendServiceMock.Setup(backend => backend.GetAllRounds(It.IsAny <String>())).ReturnsAsync(_allRounds); Connectivity.Instance = _crossConnectivityFake; }
public void SetUp() { _crossConnectivityFake = new CrossConnectivityFake(); _backendServiceMock = new Mock <IBackendService>(); _navigationServiceMock = new Mock <INavigationService>(); _round = GenerateRound(); _team = GenerateTeam(); _backendServiceMock.Setup(backend => backend.GetTeamByToken(It.IsAny <String>())).ReturnsAsync(_team); _backendServiceMock.Setup(backend => backend.GetRoundById(It.IsAny <Int32>(), It.IsAny <String>())).ReturnsAsync(_round); _sut = new RoundStartViewModel(_navigationServiceMock.Object, _backendServiceMock.Object, 1); Connectivity.Instance = _crossConnectivityFake; }
public void SetUp() { _round = GenerateRound(); _team = GenerateTeam(); _crossConnectivityFake = new CrossConnectivityFake(); _navigationServiceMock = new Mock <INavigationService>(); _roundRepositoryMock = new Mock <IRoundRepository>(); _teamRepositoryMock = new Mock <ITeamRepository>(); _backendServiceMock = new Mock <IBackendService>(); _backendServiceMock.Setup(backend => backend.GetTeamByToken(It.IsAny <String>())).ReturnsAsync(_team); _backendServiceMock.Setup(backend => backend.GetRoundById(It.IsAny <Int32>(), It.IsAny <String>())).ReturnsAsync(_round); _receiver = new QuestionViewModel(_navigationServiceMock.Object); _sender = new RoundStartViewModel(_navigationServiceMock.Object, _backendServiceMock.Object, 1); _sender.StartRoundCommand.Execute(null); _sut = new RoundEndViewModel(_navigationServiceMock.Object, _roundRepositoryMock.Object, _teamRepositoryMock.Object, _backendServiceMock.Object); FillInAnswers(); Connectivity.Instance = _crossConnectivityFake; }