コード例 #1
0
        public async Task HttpHelper_PostAsync_PassesApiResultBackToCaller()
        {
            var testData = new object();
            var fixture  = new HttpHelperTestsFixture();

            var result = await fixture.Sut.PostAsJson <object, object>(Url, testData, CancellationToken.None);

            Assert.AreEqual(fixture.ApiResult, result);
        }
コード例 #2
0
        public async Task HttpHelper_PostAsync_IsCalledCorrectly()
        {
            var testData = new object();
            var fixture  = new HttpHelperTestsFixture();

            await fixture.Sut.PostAsJson <object, object>(Url, testData, CancellationToken.None);

            fixture.MockRestHtpClient.Verify(x => x.PostAsJson <object, object>(Url, testData, CancellationToken.None));
        }