public void Test() { var listOfClassrooms = new List <Classroom>(); listOfClassrooms.Add(new Classroom { Nazwa_sali = "sala", Liczba_miejsc = 30, Pow_m2 = 30.5, Uwagi = "", IdBudynek = 1, Istnieje = true, IdFunkcja_sali = 1, Poziom = "0", Dostep_dla_niepelnosprawnych = true, Uzytkownik = "Maciek", Kolejnosc = 1, IdRozkladSali = 1, LiczbaKomputerow = 20, IdKomputer = 1, Klimatyzacja = true, }); FilteringObject fo = new FilteringObject { AirConditioning = true }; Mock <IClassroomManagementRepository> mockRepository = new Mock <IClassroomManagementRepository>(); mockRepository.Setup(x => x.GetClassroomsAsync()).Returns(listOfClassrooms.As <Task <IEnumerable <Classroom> > >()); var roomsController = new RoomsController(mockRepository.Object); roomsController.Should().NotBeNull(); }