예제 #1
0
 public void TestObjectContextPath()
 {
     Assert.AreEqual(string.Empty, FluentFormContext.Path);
     FluentFormContext.SpecifyObject("Test");
     Assert.AreEqual("Test", FluentFormContext.Path);
     FluentFormContext.Clear();
     Assert.AreEqual(string.Empty, FluentFormContext.Path);
 }
예제 #2
0
        public void TestForgetArrayContextPath()
        {
            Assert.AreEqual(string.Empty, FluentFormContext.Path);

            FluentFormContext.SpecifyArray("Test", new object());
            Assert.AreEqual("Test[0]", FluentFormContext.Path);

            FormContextInstance context = FluentFormContext.SpecifyArray("Test", new object(), true);

            Assert.AreEqual("Test[0].Test[0]", FluentFormContext.Path);

            context.Dispose();
            Assert.AreEqual("Test[0]", FluentFormContext.Path);

            FluentFormContext.Clear();
            Assert.AreEqual(string.Empty, FluentFormContext.Path);
        }
예제 #3
0
 public void TearDown()
 {
     FluentFormContext.Clear();
 }