public TestDescriptor(string name, TestTypeInfo[] controllers, IErrorDescriptor[] errors, params BindingTest[] bindingTree)
 {
     Name = name;
     Controllers = controllers;
     Errors = errors ?? new IErrorDescriptor[0];
     BindingTree = bindingTree;
 }
        public override void Validate(IErrorDescriptor errorDesc)
        {
            base.Validate(errorDesc);
            ErrorMissingProvider error = (errorDesc as ErrorMissingProvider);

            for (int i = 0; i < this.controllerTypesList.Count; i++)
            {
            }

        }
        public override void Validate(IErrorDescriptor errorDesc)
        {
            base.Validate(errorDesc);
            ErrorResourceLoop error = (errorDesc as ErrorResourceLoop);

            for (int i = 0; i < this.controllersList.Count; i++)
            {
            }

        }
        public override void Validate(IErrorDescriptor errorDesc)
        {
            base.Validate(errorDesc);
            ErrorInvalidBinding errorIB = (errorDesc as ErrorInvalidBinding);

            //TODO: make a sort here would be better
            for (int i = 0; i < this.bindingsList.Count; i++)
            {
            }
        }
        public override void Validate(IErrorDescriptor errorDesc)
        {
            base.Validate(errorDesc);
            ErrorInconsResourceType error = (errorDesc as ErrorInconsResourceType);

            List<string> firstList = error.controllersList.Keys.OrderBy(x => x).ToList<string>();
            List<string> secondList = this.controllersList.Keys.OrderBy(x => x).ToList<string>();

            for (int i = 0; i < firstList.Count; i++)
            {
            }

        }
        public override void Validate(IErrorDescriptor errorDesc)
        {
            base.Validate(errorDesc);
            ErrorInvalidBinding errorIB = (errorDesc as ErrorInvalidBinding);
            Assert.IsNotNull(errorIB, "Compared Invalid Binding error has incompatible type.");

            Assert.AreEqual(errorIB.controllerType, this.controllerType, "Controller types in Invalid Binding error are different: '{0}' and '{1}'", errorIB.controllerType, this.controllerType);
            Assert.AreEqual(errorIB.bindingsList.Count, this.bindingsList.Count, "Binding lists in compared Invalid Binding errors have different length: '{0}' and '{1}'", errorIB.bindingsList.Count, this.bindingsList.Count);

            //TODO: make a sort here would be better
            for (int i = 0; i < this.bindingsList.Count; i++)
            {
                Assert.AreEqual(this.bindingsList[i], errorIB.bindingsList[i], "Bindings are different in Invalid Binding error: '{0}' and '{1}'", this.bindingsList[i], errorIB.bindingsList[i]);
            }
        }
        public override void Validate(IErrorDescriptor errorDesc)
        {
            base.Validate(errorDesc);
            ErrorResourceLoop error = (errorDesc as ErrorResourceLoop);
            Assert.IsNotNull(error, "Compared Resource Loop error has incompatible type.");

            Assert.AreEqual(error.fullBindingUrl, this.fullBindingUrl, "Binding urls are different: '{0}' and '{1}'", error.fullBindingUrl, this.fullBindingUrl);
            Assert.AreEqual(error.controllersList.Count, this.controllersList.Count, "Controllers lists have different length: '{0}' and '{1}'", error.controllersList.Count, this.controllersList.Count);

            for (int i = 0; i < this.controllersList.Count; i++)
            {
                Assert.AreEqual(this.controllersList[i], error.controllersList[i], "Controller names are different in lists: '{0}' and '{1}'", this.controllersList[i], error.controllersList[i]);
            }

        }
 public virtual void Validate(IErrorDescriptor errorDesc)
 {
 }
Пример #9
0
 private void NewErrorTest(string name, TestTypeInfo[] types, IErrorDescriptor[] errors, params BindingTest[] nodes)
 {
     tests.Add(new TestDescriptor(name, types, errors, nodes));
 }
Пример #10
0
 private void NewTestWithUrl(string name, TestTypeInfo[] types, UrlControllersTest[] urlTests, IErrorDescriptor[] errors, params BindingTest[] nodes)
 {
     tests.Add(new TestDescriptor(name, types, errors, urlTests, nodes));
 }
 public virtual void Validate(IErrorDescriptor errorDesc)
 {
     Assert.IsNotNull(errorDesc, "Compared Error is null.");
 }