Exemplo n.º 1
0
 private void CheckDefaultFacet(MethodInfo defaultMethod, INakedObjectActionParamPeer parameter) {
     IFacet facet = parameter.GetFacet(typeof (IActionDefaultsFacet));
     Assert.IsNotNull(facet);
     Assert.IsTrue(facet is ActionDefaultsFacetViaMethod);
     Assert.AreEqual(defaultMethod, ((ActionDefaultsFacetViaMethod) facet).GetMethod());
     Assert.IsTrue(methodRemover.GetRemoveMethodMethodCalls().Contains(defaultMethod));
 }
Exemplo n.º 2
0
 private void CheckAutoCompleteFacetIsNull(MethodInfo autoCompleteMethod, INakedObjectActionParamPeer parameter) {
     IFacet facet = parameter.GetFacet(typeof (IAutoCompleteFacet));
     Assert.IsNull(facet);
     Assert.IsFalse(methodRemover.GetRemoveMethodMethodCalls().Contains(autoCompleteMethod));
 }
Exemplo n.º 3
0
        private void CheckAutoCompleteFacet(MethodInfo autoCompleteMethod, INakedObjectActionParamPeer parameter, int pageSize, int minLength) {
            IFacet facet = parameter.GetFacet(typeof (IAutoCompleteFacet));
            Assert.IsNotNull(facet);
            Assert.IsTrue(facet is AutoCompleteFacetViaMethod);
            var acf = (AutoCompleteFacetViaMethod) facet;
            Assert.AreEqual(autoCompleteMethod, acf.GetMethod());
            Assert.IsTrue(methodRemover.GetRemoveMethodMethodCalls().Contains(autoCompleteMethod));

            Assert.AreEqual(pageSize, acf.PageSize);
            Assert.AreEqual(minLength, acf.MinLength);
        }