Beispiel #1
0
        public void Should_HaveReplenishmentPeriod_SetToIntDefaultValueAsString()
        {
            //Arrange
            ItemsTestHelper.InitializeDateTimeProviderMock(DateTimeProviderMock);

            //Act
            var result = ItemBuilder.BuildItemViewModel();

            //Assert
            result.ReplenishmentPeriodString.Should().Be("1");
        }
Beispiel #2
0
        public void Should_HaveNextReplenishmentDate_SetOnlyAsDate()
        {
            //Arrange
            ItemsTestHelper.InitializeDateTimeProviderMock(DateTimeProviderMock);

            //Act
            var result = ItemBuilder.BuildItemViewModel();

            //Assert
            result.NextReplenishmentDate.Should().BeSameDateAs(new DateTime(2020, 10, 01));
        }
Beispiel #3
0
        public void Should_HaveAllOtherPropertiesExceptForNextReplenishmentDateAndReplenishmentPeriod_SetToTheirDefaultValues()
        {
            //Arrange
            ItemsTestHelper.InitializeDateTimeProviderMock(DateTimeProviderMock);

            //Act
            var result = ItemBuilder.BuildItemViewModel();

            //Assert
            AssertHelper.AssertAll(
                () => result.Id.Should().Be(0),
                () => result.Name.Should().BeNull()
                );
        }
Beispiel #4
0
 public void Show()
 {
     ItemToAdd  = ItemBuilder.BuildItemViewModel();
     ShowDialog = true;
     StateHasChanged();
 }