Ejemplo n.º 1
0
        public void GetParcel_ByReceipient_Succeeded()
        {
            Receipient given = new Receipient
            {
                Name       = "Johannes",
                Street     = "Street",
                PostalCode = "A-1230"
            };

            _dal.Create(new Parcel()
            {
                Weight     = 1,
                State      = Parcel.StateEnum.InTransportEnum,
                Receipient = given,
                Sender     = given,
                TrackingId = "ABCDEF123"
            });

            IEnumerable <Parcel> parcels = _dal.GetByName(given.Name);

            Assert.NotNull(parcels);
            Assert.IsNotEmpty(parcels);
            Assert.AreEqual(1, parcels.Count());
        }