public async Task JsonAsync() { var result = new Models.ModelSimple() { Age = 0, Comments = "Comment", IsValid = true, Name = "Test", }; await FileLogger.JsonAsync(result); }
public void TrimModel() { var model = new Models.ModelSimple() { Age = 0, Comments = " Comment ", IsValid = true, Name = " Test " }; var result = new Models.ModelSimple() { Age = 0, Comments = "Comment", IsValid = true, Name = "Test" }; StringExtensions.TrimModel <Models.ModelSimple>(model); Assert.Equal(result.Comments, model.Comments); Assert.Equal(result.Name, model.Name); }