public void ToStringTest() { // Arrange CardSetFile file = new CardSetFile(); const string testUrl = "http://website.com"; int expireTime = 1111111; const string cdn = "http://cdn.com"; file.cdn_root = cdn; file.expire_time = expireTime; file.url = testUrl; // Act string toString = file.ToString(); // Assert Assert.IsTrue(toString.Contains("cdn_root")); Assert.IsTrue(toString.Contains("expire_time")); Assert.IsTrue(toString.Contains("url")); }
public async Task Start(string[] args) { _serviceProvider.GetService <ILoggerFactory>() .AddConsole(LogLevel.Debug); var loggerFactory = _serviceProvider.GetService <ILoggerFactory>(); var logger = loggerFactory.CreateLogger <Program>(); logger.LogDebug("Starting application"); IHttpClientService service = _serviceProvider.GetService <IHttpClientService>(); string locationJson = await service.GetRawJsonFileLocation("01"); IJsonParsingManager jsonParser = _serviceProvider.GetService <IJsonParsingManager>(); CardSetFile cardSetFile = jsonParser.ParseRawJsonFileLocation(locationJson); logger.LogDebug(cardSetFile.ToString()); string cardSetJson = await service.GetCardSetJson(cardSetFile); CardSet cards = jsonParser.ParseRawJsonFile(cardSetJson); logger.LogDebug(cards.ToString()); }