コード例 #1
0
        public MyTeamsPage()
        {
            InitializeComponent();
            Title          = "My Teams";
            BindingContext = myTeamsPageViewModel = new MyTeamsPageViewModel();

            if (myTeamsPageViewModel.teamsList.Count == 0)
            {
                myTeamsPageViewModel.LoadTeamsCommand.Execute(null);
            }
        }
コード例 #2
0
        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"));
        }
コード例 #3
0
        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);
        }
コード例 #4
0
        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);
        }
コード例 #5
0
 public MyTeamsPage()
 {
     InitializeComponent();
     _viewModel     = new MyTeamsPageViewModel();
     BindingContext = _viewModel;
 }