public void GetAsyncTest()
        {
            var sample = CreateRandomEntity(1);

            int res = _repository.InsertAsync(sample).Result;

            var result = _repository.GetAsync(sample.Id).Result;

            FullCompare(sample, result);
        }
Exemple #2
0
        public async Task GetAsyncTest()
        {
            var oneHourElectricity = new OneHourElectricity
            {
                DateTime = DateTime.UtcNow,
                KiloWatt = 12312,
                PanelId  = 1
            };

            var insertResponse = await _repository.InsertAsync(oneHourElectricity);

            Assert.NotEqual(default(int), oneHourElectricity.Id);

            var result = await _repository.GetAsync(oneHourElectricity.Id);

            Assert.True(result.KiloWatt == 12312);

            Assert.True(result.PanelId == 1);
        }