コード例 #1
0
        public void GetAllFilterByCurrent_Test()
        {
            // Arrange
            TestKolgraphEntities context = new TestKolgraphEntities();
            var repository = new BranchRepository(context);
            var service    = new BranchService(repository);

            // Act
            IEnumerable <BranchModel> result = service.GetAllFilterByCurrent();

            // Assert
            Assert.IsNotNull(result);
            Assert.AreEqual(context.branch.Where(x => x.isCurrent).Count(), result.Count());
            Assert.AreEqual(result.Where(x => x.IsCurrent).Count(), result.Count());
        }