Пример #1
0
        public void TestAllCropsLoaded()
        {
            //Arrange
            List <Crop> crops = null;
            ObservableCollection <Crop> expectedCrops = ListExtensions.ToObservableCollection(cropService.getAllCrops().Result);

            //Act
            var cropManagementViewModel = new CropSettingsViewModel(this.cropService, new NavigationService());

            cropManagementViewModel.GetAllCrops(null);
            while (crops == null)
            {
                crops = cropManagementViewModel.CropList;
            }



            //Assert
            Assert.Equal(ListExtensions.ToObservableCollection(crops), expectedCrops);
        }
Пример #2
0
        public void TestCommand3NotNull()
        {
            var cropManagementViewModel = new CropSettingsViewModel(this.cropService, new NavigationService());

            Assert.NotNull(cropManagementViewModel.GetAllCropsCommand);
        }