Package com.alibaba.citrus.util

Examples of com.alibaba.citrus.util.HumanReadableSize


    public void setSizeMax(HumanReadableSize sizeMax) {
        this.sizeMax = assertNotNull(sizeMax, "sizeMax");
    }

    public void setSizeMax(long sizeMax) {
        setSizeMax(new HumanReadableSize(sizeMax));
    }
View Full Code Here


    public void setFileSizeMax(HumanReadableSize fileSizeMax) {
        this.fileSizeMax = assertNotNull(fileSizeMax, "fileSizeMax");
    }

    public void setFileSizeMax(long fileSizeMax) {
        setFileSizeMax(new HumanReadableSize(fileSizeMax));
    }
View Full Code Here

    public void setSizeThreshold(HumanReadableSize sizeThreshold) {
        this.sizeThreshold = assertNotNull(sizeThreshold, "sizeThreshold");
    }

    public void setSizeThreshold(int sizeThreshold) {
        this.sizeThreshold = new HumanReadableSize(sizeThreshold);
    }
View Full Code Here

        verifyMocks();
    }

    @Test
    public void checkCookieHeaderValue_setMaxSetCookieSize() {
        filter.setMaxSetCookieSize(new HumanReadableSize(20));
        assertEquals(20, filter.getMaxSetCookieSize().getValue());

        responseMock.addHeader("Set-Cookie", "test=value");
        responseMock.addHeader("Set-Cookie", "");
        replayMocks();
View Full Code Here

        } catch (IllegalArgumentException e) {
            assertThat(e, exception("maxSize"));
        }

        // set values
        v.setMinSize(new HumanReadableSize(123));
        v.setMaxSize(new HumanReadableSize(456));

        assertEquals(123, v.getMinSize().getValue());
        assertEquals(456, v.getMaxSize().getValue());
    }
View Full Code Here

        verifyMocks();
    }

    @Test
    public void checkCookieHeaderValue_setMaxSetCookieSize() {
        filter.setMaxSetCookieSize(new HumanReadableSize(20));
        assertEquals(20, filter.getMaxSetCookieSize().getValue());

        responseMock.addHeader("Set-Cookie", "test=value");
        responseMock.addHeader("Set-Cookie", "");
        replayMocks();
View Full Code Here

            keyValuesComponent.visitTemplate(context, keyValues);
        }

        private String formatMemory(long memory) {
            return String.format("%s (%,d)", new HumanReadableSize(memory), memory);
        }
View Full Code Here

    public void setSizeMax(HumanReadableSize sizeMax) {
        this.sizeMax = assertNotNull(sizeMax, "sizeMax");
    }

    public void setSizeMax(long sizeMax) {
        setSizeMax(new HumanReadableSize(sizeMax));
    }
View Full Code Here

    public void setFileSizeMax(HumanReadableSize fileSizeMax) {
        this.fileSizeMax = assertNotNull(fileSizeMax, "fileSizeMax");
    }

    public void setFileSizeMax(long fileSizeMax) {
        setFileSizeMax(new HumanReadableSize(fileSizeMax));
    }
View Full Code Here

    public void setSizeThreshold(HumanReadableSize sizeThreshold) {
        this.sizeThreshold = assertNotNull(sizeThreshold, "sizeThreshold");
    }

    public void setSizeThreshold(int sizeThreshold) {
        this.sizeThreshold = new HumanReadableSize(sizeThreshold);
    }
View Full Code Here

TOP

Related Classes of com.alibaba.citrus.util.HumanReadableSize

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.