public async Task TestPutCustomertemAsync()
        {
            // Arrange
            var request = new
            {
                Url  = "/api/Customer/4",
                Body = new
                {
                    Id           = 4,
                    customerName = "Ahmed Mostafa Matloub",
                    address      = "Egypt Cairo",
                }
            };

            // Act
            var response = await Client.PutAsync(request.Url, ContentHelper.GetStringContent(request.Body));

            // Assert
            response.EnsureSuccessStatusCode();
        }
Example #2
0
        public async Task TestPutVehicleItemAsync()
        {
            // Arrange
            var request = new
            {
                Url = "/api/Vehicle/8",

                Body = new
                {
                    Id          = 8,
                    vin         = "Test1232124",
                    regNumber   = "TestReg123",
                    customerFk  = 2,
                    isConnected = false,
                }
            };

            // Act
            var response = await Client.PutAsync(request.Url, ContentHelper.GetStringContent(request.Body));

            // Assert
            response.EnsureSuccessStatusCode();
        }
Example #3
0
        public async Task TestPostVehicleItemAsync()
        {
            // Arrange
            var request = new
            {
                Url  = "/api/Vehicle",
                Body = new
                {
                    vin         = "Test13124",
                    regNumber   = "TestReg123",
                    customerFk  = 2,
                    isConnected = true,
                }
            };

            // Act
            var response = await Client.PostAsync(request.Url, ContentHelper.GetStringContent(request.Body));

            var value = await response.Content.ReadAsStringAsync();

            // Assert
            response.EnsureSuccessStatusCode();
        }