Ejemplo n.º 1
0
            public async Task IsDisabledByDefault()
            {
                TimeService.CurrentDateTime.Returns(DateTimeOffset.Now);
                await ViewModel.Initialize();

                TestScheduler.Start();
                isEnabledObserver.SingleEmittedValue().Should().BeFalse();
            }
        public void CalculatesThePercentagesOfDifferentGroups()
        {
            Report.Groups.Returns(groups);

            ReportsSubject.OnNext(Report);

            TestScheduler.Start();
            barsObserver.SingleEmittedValue()
            .Should().BeEquivalentTo(new[]
            {
                new BarViewModel(3.0 / 14.0, (13.0 - 3.0) / 14.0),
                new BarViewModel(4.0 / 14.0, (11.0 - 4.0) / 14.0),
                new BarViewModel(5.0 / 14.0, (10.0 - 5.0) / 14.0),
                new BarViewModel(6.0 / 14.0, (9.0 - 6.0) / 14.0),
                new BarViewModel(7.0 / 14.0, (8.0 - 7.0) / 14.0)
            });
        }