public void GetElement_InputExistingId_SubscribeReturned() { int?SubscribeId = 2; var mock = new Mock <IUnitOfWork>(); mock.Setup(a => a.Subscribs.GetElement(SubscribeId.Value)).Returns(new Subscribe()); var service = new SubscribeService(mock.Object); var result = service.GetElement(SubscribeId.Value) as SubscribeDTO; Assert.IsNotNull(result); }