示例#1
0
        public WeatherStationControllerTest()
        {
            var connection = new SqliteConnection("Data Source=:memory:");

            connection.Open();

            var options = new DbContextOptionsBuilder <ApiDbContext>().UseSqlite(connection).Options;

            _context = new ApiDbContext(options);

            _uut = new WeatherStationController(_context, null);
        }
示例#2
0
 public void Setup()
 {
     _weatherStationRepositoryMock = new Mock <IWeatherStationRepository>();
     WeatherStationController      = new WeatherStationController(_weatherStationRepositoryMock.Object);
 }