public IViewComponentResult Invoke() { var model = new ToastNotificationViewModel() { ToastMessages = _tempDataWrapper.Get <IEnumerable <ToastMessage> >(Constants.TempDataKey), GlobalOptionJson = _globalOption.MergeWith(ToastOption.Defaults).Json }; return(View("ToastrView", model)); }
public IViewComponentResult Invoke() { var model = new ToastNotificationViewModel() { ToastMessagesJson = _toastNotification.ReadAllMessages().ToJson(), GlobalOptionJson = _globalOption.MergeWith(ToastOption.Defaults).Json, RequestHeaderKey = Constants.RequestHeaderKey, LibraryName = _nToastNotifyOption.Library.ToString().ToLower() }; return(View("ToastrView", model)); }
public void MergeWith_ValidArguments_ReturnMergedObject() { //Arrange var obj1 = new ToastOption() { PositionClass = "primary" }; var obj2 = new ToastOption() { CloseClass = "Close" }; //Act obj2.MergeWith(obj1); //Assert }