Ejemplo n.º 1
0
        public void busy_flag_remains_true_whilst_deleting_data()
        {
            var deleteDinosaur = new Subject <Unit>();
            var api            = new ApiMock();
            var sut            = new DinosaurDetailsViewModelBuilder()
                                 .WithApi(
                new ApiMockBuilder()
                .WithDeleteDinosaur(deleteDinosaur)
                .Build())
                                 .WithConfirmDeleteInteraction(true)
                                 .Build();

            sut
            .DeleteCommand
            .Execute()
            .Subscribe();
            Assert.True(sut.IsBusy);

            deleteDinosaur.OnCompleted();
            Assert.False(sut.IsBusy);
        }
Ejemplo n.º 2
0
 public ApiMockBuilder()
 {
     this.api = new ApiMock();
 }
Ejemplo n.º 3
0
 public DinosaurDetailsViewModelBuilder WithApiMock(out ApiMock apiMock) =>
 this
 .WithApi(apiMock = new ApiMock());