public void Delete_WithNotDeltedStoreItem_ShouldMarkStoreItemAsDeleted()
        {
            // Arrange
            var storeItem = storeItemFixture.CreateValid();

            // Act
            storeItem.Delete();

            // Assert
            using (new AssertionScope())
            {
                storeItem.IsDeleted.Should().BeTrue();
            }
        }
예제 #2
0
        protected override (Item, IStoreItem) CreateTestObjects()
        {
            var commonFixture       = new CommonFixture();
            var availabilityFixture = new StoreItemAvailabilityFixture(commonFixture);
            var storeItemFixture    = new StoreItemFixture(availabilityFixture, commonFixture);

            var destination = storeItemFixture.CreateValid();
            var source      = GetSource(destination, commonFixture);

            return(source, destination);
        }
            private IStoreItem CreateItem(ItemCategoryId itemCategoryId, ManufacturerId manufacturerId)
            {
                var def = new StoreItemDefinition
                {
                    ItemCategoryId = itemCategoryId,
                    ManufacturerId = manufacturerId,
                    Availabilities = StoreItemAvailabilityFixture.CreateManyValid(1)
                };

                return(StoreItemFixture.CreateValid(def));
            }
 public IStoreItem CreateNewItem()
 {
     return(StoreItemFixture.CreateValid());
 }