Example #1
0
 public UpdateProductCommand(Guid id, string name, decimal price, string description, DimensionsDto dimensions)
 {
     Id          = id;
     Name        = name;
     Price       = price;
     Description = description;
     Dimensions  = dimensions;
 }
Example #2
0
 public CreateProductCommand(string name,
                             string barCode,
                             decimal price,
                             string description,
                             DimensionsDto dimensions,
                             ExternalCreation externalProperties = null,
                             Guid?manufacturerId = null,
                             Guid?categoryId     = null)
 {
     Name               = name;
     BarCode            = barCode;
     Price              = price;
     Description        = description;
     ManufacturerId     = manufacturerId;
     CategoryId         = categoryId;
     Dimensions         = dimensions;
     ExternalProperties = externalProperties;
 }
Example #3
0
        public new void Customize(IFixture fixture)
        {
            fixture.Register <CreateProductCommand>(() =>
            {
                var name               = fixture.Create <string>();
                var barCode            = fixture.Create <string>();
                var price              = fixture.Create <decimal>();
                var description        = fixture.Create <string>();
                var externalSourceName = fixture.Create <string>();
                var externalSourceId   = fixture.Create <string>();
                var length             = fixture.Create <decimal>();
                var weight             = fixture.Create <decimal>();
                var height             = fixture.Create <decimal>();
                var width              = fixture.Create <decimal>();


                var manufacturer = Domain.Entities.Manufacturer.Manufacturer.GetDraftManufacturer();

                var dimensions = new DimensionsDto
                {
                    Length = length,
                    Width  = width,
                    Height = height,
                    Weight = weight
                };

                var command = new CreateProductCommand(name,
                                                       barCode,
                                                       price,
                                                       description,
                                                       dimensions,
                                                       new ExternalCreation
                {
                    DuplicationValidated = true,
                    SourceId             = externalSourceName,
                    SourceName           = externalSourceId
                },
                                                       manufacturer.Id);

                return(command);
            });
        }
Example #4
0
 protected bool Equals(DimensionsDto other)
 {
     return(DepartmentId == other.DepartmentId && BearerId == other.BearerId && PurposeId == other.PurposeId);
 }
Example #5
0
 public Plateau(DimensionsDto dimentions)
 {
     PlateauDimentions = dimentions;
 }