示例#1
0
        public async Task Hour_ZDeleteAsync_Success()
        {
            // Act
            await repo.DeleteAsync(hour);

            //Assert
            var readResult = await repo.ReadAsync(hour.Id);

            Assert.That(readResult, Is.Null);
        }
示例#2
0
        public async Task SetUp()
        {
            var nowHour = DateTime.UtcNow.NormilizeToHour();

            repo = new HourRepository(ConnectionFactorySetup.ConnectionFactory);

            hour = await repo.CreateAsync(new Hour
            {
                HourTimeStamp = nowHour,
                Score         = 100.0m,
                InSample      = true
            });


            hour.Score = 75.0m;
            await repo.UpdateAsync(hour);

            hour = await repo.ReadAsync(hour.Id);
        }