public async Task SaveQuote_UpdatesQuote() { //arrange var databaseServiceMock = new Mock<IDatabaseService>(); var userDialogsMock = new Mock<IUserDialogs> (); var coreMethodsMock = new Mock<FreshMvvm.IPageModelCoreMethods> (); var quotePageModel = new QuotePageModel (databaseServiceMock.Object, userDialogsMock.Object); quotePageModel.CoreMethods = coreMethodsMock.Object; //act await quotePageModel.SaveQuote(); //assert databaseServiceMock.Verify (o => o.UpdateQuote (It.IsAny<Quote>())); }
public async Task SaveQuote_UpdatesQuote() { //arrange var databaseServiceMock = new Mock <IDatabaseService>(); var userDialogsMock = new Mock <IUserDialogs> (); var coreMethodsMock = new Mock <FreshMvvm.IPageModelCoreMethods> (); var quotePageModel = new QuotePageModel(databaseServiceMock.Object, userDialogsMock.Object); quotePageModel.CoreMethods = coreMethodsMock.Object; //act await quotePageModel.SaveQuote(); //assert databaseServiceMock.Verify(o => o.UpdateQuote(It.IsAny <Quote>())); }