Ejemplo n.º 1
0
        public async Task UsersViewModel_Should_NOT_Validate_THESAME_Username()
        {
            //Arrange
            var user = new Fixture().Create <User>();
            var vm   = new UsersViewModel();
            await vm.AddItem(user);

            //Act
            var result = vm.ValidateUsername(user.Username);

            //Assert
            Assert.False(result);
        }
Ejemplo n.º 2
0
        public async Task UsersViewModel_Should_load_1_users_after_AddItem()
        {
            //Arrange
            var user = new Fixture().Create <User>();
            var vm   = new UsersViewModel();

            //Act
            await vm.AddItem(user);

            await vm.ExecuteLoadItemsCommand();

            //Assert
            Assert.AreEqual(1, vm.UserList.Count);
        }