public void SetUp() { this.wandAction = "W"; this.printLabels = true; this.consignmentId = 134; this.wandString = "flajdlfjd1312"; this.userNumber = 35345; this.wandLogId = 123; this.wandLog = new WandLog { Id = this.wandLogId, ArticleNumber = "a" }; this.WandLogRepository.FindById(this.wandLogId).Returns(this.wandLog); this.wandPackResult = new WandPackResult { Message = "ok", Success = true, WandLogId = this.wandLogId }; this.WandPack.Wand(this.wandAction, this.userNumber, this.consignmentId, this.wandString) .Returns(this.wandPackResult); this.result = this.Sut.Wand( this.wandAction, this.wandString, this.consignmentId, this.userNumber, this.printLabels); }
public void SetUp() { this.wandAction = "W"; this.printLabels = true; this.consignmentId = 134; this.wandString = "flajdlfjd1312"; this.userNumber = 35345; this.wandLogId = 123; this.wandLog = new WandLog { Id = this.wandLogId, ArticleNumber = "a", ConsignmentId = this.consignmentId, ContainerNo = 1, TransType = "W" }; this.consignment = new Consignment { ConsignmentId = this.consignmentId, Address = new Address { Line1 = "this", Line2 = "address", PostCode = "d", CountryCode = "FR", Country = new Country { CountryCode = "FR", DisplayName = "France" } } }; this.WandLogRepository.FindById(this.wandLogId).Returns(this.wandLog); this.ConsignmentRepository.FindById(this.consignmentId).Returns(this.consignment); this.wandPackResult = new WandPackResult { Message = "ok", Success = true, WandLogId = this.wandLogId }; this.WandPack.Wand(this.wandAction, this.userNumber, this.consignmentId, this.wandString) .Returns(this.wandPackResult); this.PrinterMappingRepository.FindBy(Arg.Any <Expression <Func <PrinterMapping, bool> > >()).Returns( new PrinterMapping { UserNumber = this.userNumber, PrinterGroup = "DISPATCH-LABEL", PrinterName = "DispatchLabels1" }); this.result = this.Sut.Wand( this.wandAction, this.wandString, this.consignmentId, this.userNumber, this.printLabels); }
public void SetUp() { this.wandAction = "W"; this.printLabels = true; this.consignmentId = 134; this.wandString = "flajdlfjd1312"; this.userNumber = 35345; this.wandLogId = 123; this.wandLog = new WandLog { Id = this.wandLogId, ArticleNumber = "a", ConsignmentId = this.consignmentId, ContainerNo = 1, TransType = "W" }; this.consignment = new Consignment { ConsignmentId = this.consignmentId, Address = new Address { Line1 = "this", Line2 = "address", PostCode = "d", CountryCode = "GB", Country = new Country { CountryCode = "GB", DisplayName = "GB" } } }; this.WandLogRepository.FindById(this.wandLogId).Returns(this.wandLog); this.ConsignmentRepository.FindById(this.consignmentId).Returns(this.consignment); this.wandPackResult = new WandPackResult { Message = "ok", Success = true, WandLogId = this.wandLogId }; this.WandPack.Wand(this.wandAction, this.userNumber, this.consignmentId, this.wandString) .Returns(this.wandPackResult); this.result = this.Sut.Wand( this.wandAction, this.wandString, this.consignmentId, this.userNumber, this.printLabels); }