public async Task GetOrderShouldSucceed()
        {
            // Arrange
            var jsonBody = new
            {
                source         = "BKAL33+KBT T",
                relationType   = "Inbound",
                transportNo    = "784037",
                operationGroup = "UNLOADING SVEN",
                operation      = "UNLOADING SVEN"
            };
            var jsonBodyAsString = JsonConvert.SerializeObject(jsonBody);

            IPlatoOrderProvider _platoOrderProvider = new PlatoOrderProvider();

            IDateTimeProvider      dateTimeProvider      = new DateTimeProvider();
            ITypeConverterProvider typeConverterProvider = new TypeConverterProvider();
            IPlatoDataAcl          platoDataAcl          = new PlatoDataAcl(dateTimeProvider);
            IDomainConverter       domainConverter       = new DomainConverter(platoDataAcl, typeConverterProvider);

            HttpResponseMessage response = null;

            // Act
            using (HttpClient client = new HttpClient())
            {
                response = await client.PostAsync("http://s-be-ki-btst1/ECC/BTSHTTPReceive.dll", new StringContent(jsonBodyAsString, Encoding.UTF8, "application/json"));
            }
            var responseBody = await response.Content.ReadAsStringAsync();

            var platoOrderFull = _platoOrderProvider.GetPlatoOrderFull(responseBody);
            var order          = domainConverter.ToOrder(platoOrderFull.Transport);


            // Assert
            order.Should().NotBeNull();
        }
Exemple #2
0
        public static BitcoinAddress ToEntity(Core.Models.BitcoinAddress model, BitcoinAddress entity, DomainConverter converter)
        {
            entity.CreatedOn  = model.CreatedOn;
            entity.Id         = model.Id;
            entity.ModifiedOn = model.ModifiedOn;
            entity.OwnerId    = model.Owner?.EntityId;

            return(entity);
        }
Exemple #3
0
 public static Core.Models.BitcoinAddress ToModel(BitcoinAddress entity, Core.Models.BitcoinAddress model, DomainConverter converter)
 {
     return(model);
 }