Example #1
0
        public void ReturnResTest_output_list()
        {
            // Arrange
            var resourses  = new GetResourse();
            var repository = new Mock <RepositoryResourseEF>();

            repository.Setup(arg => arg.GetAll()).Returns(new List <Resourse>());
            resourses.resourse = repository.Object;

            // Act
            var resultCollection = resourses.ReturnResourse();

            // Assert
            Assert.IsNotNull(resultCollection);
        }
Example #2
0
        public MainWindow()
        {
            InitializeComponent();
            context = new ResourseContext();
            db      = new RepositoryResourseEF(context);


            db.db.Resourses.Load();

            getRes = new GetResourse();
            // context.Resourses.Load();

            //  ResourseGrid.ItemsSource = context.Resourses.Local.ToBindingList();
            ResourseGrid.ItemsSource = getRes.ReturnResourse().ToList();



            this.Closing += MainWindow_Closing;
        }
Example #3
0
 private void UPDATE()
 {
     // ResourseGrid.ItemsSource = db.db.Resourses.Local.ToBindingList();
     ResourseGrid.ItemsSource = getRes.ReturnResourse().ToList();
 }
Example #4
0
 private void updateButton_Click(object sender, RoutedEventArgs e)
 {
     //context.Resourses.Load();
     ResourseGrid.ItemsSource = getRes.ReturnResourse().ToList();
     db.Save();
 }