Beispiel #1
0
        public void GetByIdTest()
        {
            var        id         = new Guid();
            Subscriber subscriber = new Subscriber()
            {
                Id = id
            };
            var unit = new MockUnitOfWork();

            unit.MockRepository();
            unit.MockGetForRep(subscriber);
            var service = new SubscriberService(unit.Object);

            var res = service.GetById(id).GetAwaiter().GetResult();

            Assert.NotNull(res);
            Assert.Equal(id, subscriber.Id);
            Assert.IsAssignableFrom <Subscriber>(res);
        }