public void GetTest() { var wrapperMock = _factory.Create<IItemWrapper>(); _resolver.Setup(x => x.TryGet(typeof(string), null)).Returns(wrapperMock.Object).Verifiable(); var wFactory = new WrappersFactory(_resolver.Object); var actual = wFactory.Get(typeof(string)); Assert.AreEqual(wrapperMock.Object, actual); }
public void GetWithNotItemWrapperResultExceptionTest() { _resolver.Setup(x => x.TryGet(typeof(string), null)).Returns("123").Verifiable(); var wFactory = new WrappersFactory(_resolver.Object); wFactory.Get(typeof(string)); }