示例#1
0
        public void GetAllExceptId_ShouldReturnDocTypes()
        {
            // Arrange
            var context = GetContext(TestData.docTypes);
            var repo    = new SqlDocTypeRepo(context);

            int id = _rnd.Next(1, TestData.docTypes.Count());

            // Act
            var docTypes = repo.GetAllExceptId(id);

            // Assert
            Assert.Equal(TestData.docTypes.Where(v => v.Id != id),
                         docTypes);

            context.Database.EnsureDeleted();
            context.Dispose();
        }