示例#1
0
 public DemoService(DemoApiClient demoApiClient, SampleApiClient sampleApiClient, IMapper mapper, ILogger <DemoService> logger)
 {
     _demoApiClient   = demoApiClient;
     _sampleApiClient = sampleApiClient;
     _mapper          = mapper;
     _logger          = logger;
     _logger.LogDebug("DemoService constructed");
 }
示例#2
0
        public async Task DeleteCommentByUriNotWorking()
        {
            var content = $"Comment to delete {Random.Next(0, 1000)}";

            var lastCommentId = (await SampleApiClient.AddCommentToPostId(CommentUri, content)).Id;

            Assert.IsTrue((await SampleApiClient.DeleteCommentToPostId(lastCommentId)).IsSuccessStatusCode);
        }
示例#3
0
        public async Task DeleteCommentByUri()
        {
            var content = $"Comment to delete {Random.Next(0, 1000)}";

            var lastCommentId = (await SampleApiClient.AddCommentToPostId(CommentUri, content)).Id;

            Assert.IsTrue(await SampleApiClient.DeleteCommentToPostIdWorkaround(lastCommentId));
        }
 public ValueController(SampleApiClient client)
 {
     _client = client;
 }
 public async Task SetUpAsync()
 {
     SampleApiClient = await new SampleApiClient(new DesiredConfiguration(ConfigurationManager.AppSettings["baseUrl"], "username", "password")).InitializeAsync();
 }