예제 #1
0
        public void GetQueriesById_Test()
        {
            // Arrange
            int queriesWithId1Count = queriesDbSet
                                      .Where(q => q.SqlQueryId == 1)
                                      .Count();
            int queriesCountBeforeAct = queriesDbSet.Count();

            // Act
            IEnumerable <SqlQuery> queries = queryRepo.GetQueriesById(1);

            // Assert
            Assert.AreEqual(queriesWithId1Count, queries.Count());
            Assert.AreEqual(queriesCountBeforeAct, queriesDbSet.Count());
        }