예제 #1
0
        public void CanGetADatabaseEntity()
        {
            var databaseEntity = AuthTokenDatabaseEntityHelper.CreateDatabaseEntity(DatabaseContext);

            DatabaseContext.Add(databaseEntity);
            DatabaseContext.SaveChanges();

            var result = DatabaseContext.Tokens.ToList().FirstOrDefault();

            result.Should().Be(databaseEntity);
        }
        public void CanGetADatabaseEntity()
        {
            //remove any record that might be left in the table
            DatabaseContext.RemoveRange(DatabaseContext.Tokens);
            var databaseEntity = AuthTokenDatabaseEntityHelper.CreateDatabaseEntity();

            DatabaseContext.Add(databaseEntity);
            DatabaseContext.SaveChanges();

            var result = DatabaseContext.Tokens.ToList().FirstOrDefault();

            result.Should().Be(databaseEntity);
        }