package org.nutz.mock;

import org.nutz.mock.servlet.MockHttpServletRequest;
import org.nutz.mock.servlet.MockServletConfig;
import org.nutz.mock.servlet.MockServletContext;
import org.nutz.mock.servlet.multipart.MultipartInputStream;

public abstract class Mock {

	public static class servlet {
		public static MockServletContext context() {
			return new MockServletContext();
		}

		public static MockServletConfig config(String s) {
			return new MockServletConfig(context(), s);
		}

		public static MockHttpServletRequest request() {
			return new MockHttpServletRequest(context());
		}

		public static MultipartInputStream ins(String boundary) {
			return new MultipartInputStream(boundary);
		}

		public static MultipartInputStream ins() {
			return ins("------NutzMockHTTPBoundary@" + Long.toHexString(System.currentTimeMillis()));
		}

	}

}

@@ -229,16 +229,79 @@
 tream;%0A%0A
+/**%0A * %E4%B8%80%E4%BA%9B%E6%96%B9%E9%9D%A2%E7%9A%84%E9%9D%99%E6%80%81%E4%BD%A0%E5%87%BD%E6%95%B0%0A * %0A * @author zozoh(zozohtnt@gmail.com)%0A */%0A
 public a

Add comments