示例#1
0
        public async Task RetrieveService_SerialNumberRegistered_Found()
        {
            // arrange
            const string apiKey        = "RamenPosDeviceAddressApiKey";
            const string acquirerCode  = "wbc";
            const string serialNumber  = "321-404-842";
            var          deviceService = new DeviceAddressService();

            // act
            var addressResponse = await deviceService.RetrieveService(serialNumber, apiKey, acquirerCode, true);

            // assert
            Assert.NotNull(addressResponse);
            Assert.NotNull(addressResponse.Data.Address);
            Assert.Equal(DeviceAddressResponseCode.SUCCESS, addressResponse.Data.DeviceAddressResponseCode);
        }
示例#2
0
        public async void RetrieveService_SerialNumberNotRegistered_NotFound()
        {
            // arrange
            const string apiKey        = "RamenPosDeviceAddressApiKey";
            const string acquirerCode  = "wbc";
            const string serialNumber  = "111-111-111"; // invalid serial number
            var          deviceService = new DeviceAddressService();

            // act
            var addressResponse = await deviceService.RetrieveService(serialNumber, apiKey, acquirerCode, true);

            // assert
            Assert.NotNull(addressResponse);
            Assert.Equal(DeviceAddressResponseCode.SUCCESS, addressResponse.Data.DeviceAddressResponseCode);
            Assert.Equal(HttpStatusCode.NotFound, addressResponse.StatusCode);
            Assert.Equal("Not Found", addressResponse.StatusDescription);
        }