package org.wso2.carbon.device.mgt.ios.payload.beans;

import org.testng.Assert;
import org.testng.annotations.Test;
import org.wso2.carbon.device.mgt.ios.payload.dto.PayloadOperationWrapper;
import org.wso2.carbon.device.mgt.ios.payload.exception.PListException;
import org.wso2.carbon.device.mgt.ios.payload.exception.ProfileConfigurationException;
import org.wso2.carbon.device.mgt.ios.payload.operation.PasscodeOperations;

public class PasscodePolicyTestSuite {

    @Test
    public void testPasscodePolicyPayload() throws ProfileConfigurationException, PListException {

        PasscodePolicy passcodePolicy = new PasscodePolicy();
        passcodePolicy.setAllowSimple(true);
        passcodePolicy.setForcePIN(true);
        passcodePolicy.setMaxFailedAttempts(10);
        passcodePolicy.setMaxInactivity(10);
        passcodePolicy.setMaxPINAgeInDays(100);
        passcodePolicy.setMinComplexChars(1);
        passcodePolicy.setMinLength(1);
        passcodePolicy.setRequireAlphanumeric(false);
        passcodePolicy.setPinHistory(1);
        passcodePolicy.setMaxGracePeriod(1);

        PasscodeOperations passcodeOperations = new PasscodeOperations();
        PayloadOperationWrapper payload = passcodeOperations.createPasscodePolicyPayload(passcodePolicy);

        Assert.assertNotNull(payload);
    }
}
