public async Task TestUpdatePost() { // Create a post CurrencyRoot post = new CurrencyRoot { Currency = new Currency { Code = "DKK", Description = "Danska kronor", BuyRate = 7.889M, SellRate = 8.4555M, Unit = 1M } }; // Update the post FortnoxResponse<CurrencyRoot> fr = await config.fortnox_client.Update<CurrencyRoot>(post, "currencies/DKK"); // Log the error if (fr.model == null) { config.logger.LogError(fr.error); } // Test evaluation Assert.AreNotEqual(null, fr.model); } // End of the TestUpdatePost method
public async Task TestAddPost() { // Create a post CurrencyRoot post = new CurrencyRoot { Currency = new Currency { Code = "DKK", Description = "Tripple X", BuyRate = 1M, SellRate = 1M, Unit = 1M } }; // Add the post FortnoxResponse<CurrencyRoot> fr = await config.fortnox_client.Add<CurrencyRoot>(post, "currencies"); // Log the error if (fr.model == null) { config.logger.LogError(fr.error); } // Test evaluation Assert.AreNotEqual(null, fr.model); } // End of the TestAddPost method