public MyTeamsPage() { InitializeComponent(); Title = "My Teams"; BindingContext = myTeamsPageViewModel = new MyTeamsPageViewModel(); if (myTeamsPageViewModel.teamsList.Count == 0) { myTeamsPageViewModel.LoadTeamsCommand.Execute(null); } }
public async Task Test3_LoadTeamsCommand() { //Arrange //Init the user string uid = "6xyKcZwxg1cXjUkjaggIf8WGWzu1"; var user = await UsersFirestore.GetUserByUIDAsync(uid); UsersFirestore.myProfile = user; var vm = new MyTeamsPageViewModel(); //Act vm.LoadTeamsCommand.Execute(null); //Assert Assert.True(vm.teamsList[0].Id.Equals("1fhFeGGSZsIyQqwPkuMA")); }
public async Task Test2_LoadTeamsCommand() { //Arrange //Init the user string uid = "HcHGkaJGpoOSNZ19hzqUjPqcoHj1"; var user = await UsersFirestore.GetUserByUIDAsync(uid); UsersFirestore.myProfile = user; var vm = new MyTeamsPageViewModel(); //Act vm.LoadTeamsCommand.Execute(null); //Assert Assert.True(vm.teamsList.Count > 1); }
public async Task Test1_LoadTeamsCommand() { //Arrange //Init the user string uid = "6H7I6z5BsDcyU1xP53DG2CAHOj53"; var user = await UsersFirestore.GetUserByUIDAsync(uid); UsersFirestore.myProfile = user; var vm = new MyTeamsPageViewModel(); //Act vm.LoadTeamsCommand.Execute(null); //Assert Assert.True(vm.teamsList.Count > 1); }
public MyTeamsPage() { InitializeComponent(); _viewModel = new MyTeamsPageViewModel(); BindingContext = _viewModel; }