public void GetContextContextModel()
        {
            AssemblyModel.AddContext("ContextTest1", @"..\..\..\Test\ContextTest1");
            var asms = AssemblyModel.GetContext("ContextTest1");

            Assert.IsNotNull(asms);
            Assert.AreEqual("ContextTest1", asms.Name);
            Assert.AreEqual(@"..\..\..\Test\ContextTest1", asms.Folder);
            Assert.AreEqual(3, asms.Assemblies.Count);
        }
        public IView Run()
        {
            var ctx = AssemblyModel.GetContext(Context);

            var view = new ContextAssemblyView
            {
                Context    = ctx,
                Assemblies = ctx.Assemblies.Values.ToList()
            };

            return(view);
        }
Exemplo n.º 3
0
        public IView Run()
        {
            var ctx        = AssemblyModel.GetContext(Context);
            var namespaces = AssemblyModel.ListNamespaces(Context);

            var view = new ContextNamespaceView
            {
                Context    = ctx,
                Namespaces = namespaces
            };

            return(view);
        }
 public void GetContextUsingInvalidContextThrowsInvalidContextExceptionContextModel()
 {
     AssemblyModel.AddContext("ContextTest1", @"..\..\..\Test\ContextTest1");
     try
     {
         var asms = AssemblyModel.GetContext("ContextTestInvalid");
     }
     catch (InvalidContextModelException ex)
     {
         Assert.AreEqual(@"ContextTestInvalid", ex.Context);
         throw;
     }
 }
        public IView Run()
        {
            var ctx        = AssemblyModel.GetContext(Context);
            var namespaces = AssemblyModel.ListNamespaces(Context);

            var view = new ContextView
            {
                Context    = ctx,
                Assemblies = ctx.Assemblies.Values.ToList(),
                Namespaces = namespaces
            };

            return(view);
        }