示例#1
0
        public void Arrange()
        {
            _items = new List <Domain.Entities.Location>
            {
                new Domain.Entities.Location
                {
                    Id           = 1,
                    LocationName = "testing"
                },
                new Domain.Entities.Location
                {
                    Id           = 1,
                    LocationName = "test"
                },
                new Domain.Entities.Location
                {
                    Id           = 1,
                    LocationName = "retest"
                },
                new Domain.Entities.Location
                {
                    Id           = 1,
                    LocationName = "different"
                }
            };

            _locationDataContext = new Mock <ILocationDataContext>();
            _locationDataContext.Setup(x => x.Locations).ReturnsDbSet(_items);


            _locationRepository = new Data.Repository.LocationRepository(_locationDataContext.Object);
        }
示例#2
0
        public void Arrange()
        {
            _items = new List <Domain.Entities.Location>
            {
                new Domain.Entities.Location
                {
                    Id = 1
                },
                new Domain.Entities.Location
                {
                    Id = 2
                }
            };

            _locationDataContext = new Mock <ILocationDataContext>();
            _locationDataContext.Setup(x => x.Locations).ReturnsDbSet(_items);


            _locationRepository = new Data.Repository.LocationRepository(_locationDataContext.Object);
        }
示例#3
0
        public void Arrange()
        {
            _expectedLocation = new Domain.Entities.Location
            {
                Id                 = 4,
                LocationName       = "different",
                LocalAuthorityName = "test1"
            };
            _items = new List <Domain.Entities.Location>
            {
                new Domain.Entities.Location
                {
                    Id                 = 1,
                    LocationName       = "testing",
                    LocalAuthorityName = "test1"
                },
                new Domain.Entities.Location
                {
                    Id                 = 2,
                    LocationName       = "test",
                    LocalAuthorityName = "test1"
                },
                new Domain.Entities.Location
                {
                    Id                 = 3,
                    LocationName       = "retest",
                    LocalAuthorityName = "test1"
                },
                _expectedLocation
            };

            _locationDataContext = new Mock <ILocationDataContext>();
            _locationDataContext.Setup(x => x.Locations).ReturnsDbSet(_items);


            _locationRepository = new Data.Repository.LocationRepository(_locationDataContext.Object);
        }