Inheritance: IUserOutput
コード例 #1
0
ファイル: InfoTest.cs プロジェクト: zvrana/bari
        public void SetUp()
        {
            kernel = new StandardKernel();
            Kernel.RegisterCoreBindings(kernel);
            kernel.Bind<IFileSystemDirectory>().ToConstant(new TestFileSystemDirectory("root")).WhenTargetHas
                <SuiteRootAttribute>();

            output = new TestUserOutput();
            kernel.Bind<IUserOutput>().ToConstant(output).InSingletonScope();

            suite = kernel.Get<Suite>();
            suite.Name = "test suite";
            var mod1 = suite.GetModule("first module");
            var mod2 = suite.GetModule("other module");
            var mod3 = suite.GetModule("last module");

            var proj11 = mod1.GetProject("project 1.1");
            var proj12 = mod1.GetProject("project 1.2");
            var proj31 = mod3.GetProject("project 3.1");

            mod1.GetTestProject("test1");
            mod2.GetTestProject("test2");

            var cs = proj31.GetSourceSet("cs");
            var vb = proj31.GetSourceSet("vb");
            var fs = proj31.GetSourceSet("fs");

            cs.Add(new SuiteRelativePath("a.cs"));
            cs.Add(new SuiteRelativePath("b.cs"));
            cs.Add(new SuiteRelativePath("c.cs"));
            
            vb.Add(new SuiteRelativePath("x.vb"));
        }
コード例 #2
0
ファイル: HelpTest.cs プロジェクト: zvrana/bari
        public void SetUp()
        {
            kernel = new StandardKernel();            
            output = new TestUserOutput();
            kernel.Bind<IUserOutput>().ToConstant(output).InSingletonScope();
            kernel.Bind<IFileSystemDirectory>().ToConstant(new TestFileSystemDirectory("root")).WhenTargetHas
                <SuiteRootAttribute>();
            kernel.Bind<IFileSystemDirectory>().ToConstant(new TestFileSystemDirectory("target")).WhenTargetHas
                <TargetRootAttribute>();
            kernel.Bind<IFileSystemDirectory>().ToConstant(new TestFileSystemDirectory("cache")).WhenTargetHas
                <CacheRootAttribute>();

            Kernel.RegisterCoreBindings(kernel);
        }