public override string SetDefaultInventoryLocationId(string inventoryLocationId)
        {
            var testCookieDto = _testCookieAccessor.Read();

            testCookieDto.ScopeAndLocationId = inventoryLocationId;
            _testCookieAccessor.Write(testCookieDto);

            return(inventoryLocationId);
        }
Ejemplo n.º 2
0
        public void WHEN_Passing_Valid_Parameters_SHOULD_Succeed(string customerIdGuid, bool?isGuest)
        {
            // Arrange
            ICookieAccessor <ComposerCookieDto> accessor = _container.CreateInstance <ComposerCookieAccessor>();
            Guid?customerId = customerIdGuid != null ? new Guid(customerIdGuid) : (Guid?)null;

            // Act
            ComposerCookieDto dto = accessor.Read();

            dto.EncryptedCustomerId = new EncryptionUtility().Encrypt(customerId.ToString());
            dto.IsGuest             = isGuest;
            accessor.Write(dto);

            // Assert
            _container.Get <HttpResponseBase>().Cookies.Count.Should().BeGreaterThan(0);
        }