public void some_properties_can_be_ignored() { var sut = new PartialNotification(); sut.AssertThatAllProperties() .Ignoring(x => x.NoNotification).RaiseChangeNotification(); }
private async Task GetStudentMainCardView(bool isSturted, PartialNotification notification = null) { StudentMainCard = await _servStudents.GetStudentMainCardAsync(); StudentMainCard.IsSturtedTemplate = isSturted; StudentMainCard.Notification = notification; }
public async Task <IActionResult> OnPostCreateUserAsync(FormRegisterUser registerUser) { if (SessionHasExpired) { return(Redirect("/")); } var answ = await _httpApi.CreateAppUserAsync(registerUser); Notification = new PartialNotification { IsSuccess = answ.IsSuccess, NotifyMessage = answ.Reason, SessionUserName = _session.User.Name }; if (!answ.IsSuccess) { Notification.NotifyMessage = "Something went wrong, try again"; } else { Notification.NotifyMessage = string .Format($"Користувача {registerUser.Name} {registerUser.SecondName} успішно створено"); } return(Page()); }