using Blazorise; using HeartTrack.Models; using Xunit; namespace HeartTrack.Tests.Models { public class ReportTests { [Fact] public void IsReportInstanceOfReport() { var report = new Report(); Assert.IsType(report); } [Fact] public void HasReportAttributeRightInstace() { var report = new Report(); Assert.IsType(report.Id); Assert.IsType(report.Username); Assert.IsType(report.ReportedUser); Assert.IsType(report.Raison); Assert.IsType(report.Description); Assert.IsType(report.Image); } [Fact] public void IsReportModelValidate() { var report = new ReportModel(); Assert.True(report.Id < 2500000); Assert.True(report.Username.Length < 50 && report.Username.Length>0); Assert.True(report.ReportedUser.Length < 50 && report.ReportedUser.Length > 0); Assert.True(report.Raison.Length < 150 && report.Raison.Length > 0); Assert.True(report.Description.Length < 500 && report.Description.Length > 0); } } }