コード例 #1
0
            public async Task ReturnsNullIfNotFound()
            {
                var authorName     = Guid.NewGuid().ToString().Replace("-", string.Empty);
                var actualAuthorId = await AuthorsEndpoint.GetAuthorIdByName(authorName);

                Assert.Null(actualAuthorId);
            }
コード例 #2
0
            public async Task ReturnsAnAuthorId()
            {
                var authorName       = "Brandon Sanderson";
                var expectedAuthorId = 38550;
                var actualAuthorId   = await AuthorsEndpoint.GetAuthorIdByName(authorName);

                Assert.NotNull(actualAuthorId);
                Assert.Equal(actualAuthorId, expectedAuthorId);
            }