public void GetProfileById_ValidId_ProfileReturned() { //Arrange const string ProfileId = "adaSfaqwfasfasdasdfasfasfasd"; string jsonProfile = Properties.Resources.JsonProfile; Mock<IHttpTransport> httpTransportMock = new Mock<IHttpTransport>(MockBehavior.Strict); httpTransportMock.Setup(httpTransport => httpTransport.Request(It.IsAny<string>(), It.IsAny<ContentType>(), It.IsIn("GET", "POST"), null, null)) .Returns(jsonProfile); //Action NextCallerClient client = new NextCallerClient(httpTransportMock.Object); string profile = client.GetByProfileIdJson(ProfileId); //Assert httpTransportMock.Verify(httpTransport => httpTransport.Request(It.IsAny<string>(), It.IsAny<ContentType>(), It.IsIn("GET", "POST"), null, null), Times.Once); Assert.IsNotNull(profile); Assert.AreEqual(jsonProfile, profile); }