Beispiel #1
0
 public void SetUp()
 {
     fileController = MockRepository.GenerateMock <IFileController>();
     fileController.Stub(f => f.DirectoryExists("Folder")).Return(true);
     fileController.Stub(f => f.CanReadFilesFrom("Folder")).Return(true);
     fileController.Stub(f => f.FindAllFilesLike("Folder", "*.apiext.xml")).Return(new string[0]);
 }
Beispiel #2
0
 public void SetUp()
 {
     fileController = MockRepository.GenerateMock <IFileController>();
     fileController.Stub(f => f.DirectoryExists("Folder")).Return(true);
     fileController.Stub(f => f.CanReadFilesFrom("Folder")).Return(true);
     fileController.Stub(f => f.FindAllFilesLike("Folder", "*.apiext.xml")).Return(new[] { "Folder\\Specs_For_Project_Loading__ApiExtensions.ApiExtensionTest.apiext.xml" });
     fileController.Stub(f => f.ReadAllText("Folder\\Specs_For_Project_Loading__ApiExtensions.ApiExtensionTest.apiext.xml")).Return(ExpectedXml);
 }
 public void SetUp()
 {
     fileController = MockRepository.GenerateMock <IFileController>();
     fileController.Stub(f => f.DirectoryExists("Folder")).Return(true);
     fileController.Stub(f => f.FileExists("Folder\\Outputs.xml")).Return(true);
     fileController.Stub(f => f.CanReadFile("Folder\\Outputs.xml")).Return(true);
     fileController.Stub(f => f.ReadAllText("Folder\\Outputs.xml")).Return(JustRootFolder);
 }
 public void SetUp()
 {
     fileController = MockRepository.GenerateMock <IFileController>();
     fileController.Stub(f => f.ToAbsolutePath("temp-compile", "Folder\\Project.aad")).Return("Folder\\temp-compile");
     fileController.Stub(f => f.ToAbsolutePath("debug.wbproj", "Folder\\Project.aad")).Return("Folder\\debug.wbproj");
     fileController.Stub(f => f.ToAbsolutePath("file.dll", "Folder\\Project.aad")).Return("Folder\\file.dll");
     fileController.Stub(f => f.ToAbsolutePath("test gen", "Folder\\Project.aad")).Return("Folder\\test gen");
 }
 public void SetUp()
 {
     fileController = MockRepository.GenerateMock <IFileController>();
     fileController.Stub(f => f.DirectoryExists("Folder")).Return(true);
     fileController.Stub(f => f.CanReadFilesFrom("Folder")).Return(true);
     fileController.Stub(f => f.FindAllFilesLike("Folder", "*.function.xml")).Return(new[] { "Folder\\Function.function.xml" });
     fileController.Stub(f => f.ReadAllText("Folder\\Function.function.xml")).Return(expectedXml);
 }
 public void SetUp()
 {
     fileController = MockRepository.GenerateMock<IFileController>();
     fileController.Stub(f => f.ToAbsolutePath("temp-compile", "Folder\\Project.aad")).Return("Folder\\temp-compile");
     fileController.Stub(f => f.ToAbsolutePath("debug.wbproj", "Folder\\Project.aad")).Return("Folder\\debug.wbproj");
     fileController.Stub(f => f.ToAbsolutePath("file.dll", "Folder\\Project.aad")).Return("Folder\\file.dll");
     fileController.Stub(f => f.ToAbsolutePath("test gen", "Folder\\Project.aad")).Return("Folder\\test gen");
 }
 public void SetUp()
 {
     fileController = MockRepository.GenerateMock<IFileController>();
     fileController.Stub(f => f.DirectoryExists("Folder")).Return(true);
     fileController.Stub(f => f.CanReadFilesFrom("Folder")).Return(true);
     fileController.Stub(f => f.FindAllFilesLike("Folder", "*.apiext.xml")).Return(new[] { "Folder\\Specs_For_Project_Loading__ApiExtensions.ApiExtensionTest.apiext.xml" });
     fileController.Stub(f => f.ReadAllText("Folder\\Specs_For_Project_Loading__ApiExtensions.ApiExtensionTest.apiext.xml")).Return(ExpectedXml);
 }
        public void SetUp()
        {
            fileController = MockRepository.GenerateMock <IFileController>();
            fileController.Stub(f => f.DirectoryExists("Folder")).Return(true);
            fileController.Stub(f => f.CanCreateFilesIn("Folder")).Return(true);

            ExtensionMethod = new ApiExtensionMethod(typeof(ApiExtensionTest).GetMethod("Method1"));
        }
        public void SetUp()
        {
            fileController = MockRepository.GenerateMock<IFileController>();
            fileController.Stub(f => f.DirectoryExists("Folder")).Return(true);
            fileController.Stub(f => f.CanCreateFilesIn("Folder")).Return(true);

            userOption = new UserOption("var", "Gen", typeof(string), "test-text", "test-description", new string[0], "dv-body", typeof(bool), "validator body", "return true;", true);
        }
        public void SetUp()
        {
            fileController = MockRepository.GenerateMock <IFileController>();
            fileController.Stub(f => f.DirectoryExists("Folder")).Return(true);
            fileController.Stub(f => f.CanCreateFilesIn("Folder")).Return(true);

            userOption = new UserOption("var", "Gen", typeof(string), "test-text", "test-description", new string[0], "dv-body", typeof(bool), "validator body", "return true;", true);
        }
 public void SetUp()
 {
     fileController = MockRepository.GenerateMock<IFileController>();
     fileController.Stub(f => f.DirectoryExists("Folder")).Return(true);
     fileController.Stub(f => f.CanReadFilesFrom("Folder")).Return(true);
     fileController.Stub(f => f.FindAllFilesLike("Folder", "*.useroption.xml")).Return(new[] { "Folder\\var.useroption.xml" });
     fileController.Stub(f => f.ReadAllText("Folder\\var.useroption.xml")).Return(expectedXml);
 }
Beispiel #12
0
 public void SetUp()
 {
     fileController = MockRepository.GenerateMock <IFileController>();
     fileController.Stub(f => f.DirectoryExists("Folder")).Return(true);
     fileController.Stub(f => f.CanReadFilesFrom("Folder")).Return(true);
     fileController.Stub(f => f.FindAllFilesLike("Folder", "*.useroption.xml")).Return(new string[0]);
     fileController.Stub(f => f.FileExists(ProjectSerialiserV1.UserOptionsDetailsFileName)).Return(true);
     fileController.Stub(f => f.ReadAllText(ProjectSerialiserV1.UserOptionsDetailsFileName)).Return(Constructing_The_XML_For_The_UserOptions_Details.ExpectedXml);
 }
Beispiel #13
0
        public void SetUp()
        {
            bytes = new byte[] { 0, 1, 2 };

            fileController = MockRepository.GenerateMock <IFileController>();
            fileController.Stub(f => f.DirectoryExists("Folder")).Return(true);
            fileController.Stub(f => f.CanCreateFilesIn("Folder")).Return(true);
            fileController.Stub(f => f.ReadAllBytes("static.dat")).Return(bytes);
        }
        public void SetUp()
        {
            fileController = MockRepository.GenerateMock <IFileController>();
            fileController.Stub(f => f.DirectoryExists("Folder")).Return(true);
            fileController.Stub(f => f.CanCreateFilesIn("Folder")).Return(true);

            project             = MockRepository.GenerateStub <IDesignerProject>();
            project.ProjectName = "Project";
            project.Stub(p => p.Namespaces).Return(new List <string>());
            project.Stub(p => p.References).Return(new List <ReferencedFile>().AsReadOnly());
        }
 public void SetUp()
 {
     fileController = MockRepository.GenerateMock<IFileController>();
     fileController.Stub(f => f.DirectoryExists("Folder")).Return(true);
     fileController.Stub(f => f.CanReadFilesFrom("Folder")).Return(true);
     fileController.Stub(f => f.GetAllFilesFrom("Folder")).Return(new[] { "Folder\\static.dat", "Folder\\StaticFiles.xml" });
     fileController.Stub(f => f.FileExists("Folder\\static.dat")).Return(true);
     fileController.Stub(f => f.CanReadFile("Folder\\static.dat")).Return(true);
     fileController.Stub(f => f.FileExists("Folder\\StaticFiles.xml")).Return(true);
     fileController.Stub(f => f.CanReadFile("Folder\\StaticFiles.xml")).Return(true);
     fileController.Stub(f => f.ReadAllText("Folder\\StaticFiles.xml")).Return(ExpectedXml);
 }
Beispiel #16
0
 public void SetUp()
 {
     fileController = MockRepository.GenerateMock <IFileController>();
     fileController.Stub(f => f.DirectoryExists("Folder")).Return(true);
     fileController.Stub(f => f.CanReadFilesFrom("Folder")).Return(true);
     fileController.Stub(f => f.GetAllFilesFrom("Folder")).Return(new[] { "Folder\\static.dat", "Folder\\StaticFiles.xml" });
     fileController.Stub(f => f.FileExists("Folder\\static.dat")).Return(true);
     fileController.Stub(f => f.CanReadFile("Folder\\static.dat")).Return(true);
     fileController.Stub(f => f.FileExists("Folder\\StaticFiles.xml")).Return(true);
     fileController.Stub(f => f.CanReadFile("Folder\\StaticFiles.xml")).Return(true);
     fileController.Stub(f => f.ReadAllText("Folder\\StaticFiles.xml")).Return(ExpectedXml);
 }
 public void SetUp()
 {
     fileController = MockRepository.GenerateMock <IFileController>();
     fileController.Stub(f => f.DirectoryExists("Folder")).Return(false);
     fileController.Stub(f => f.CanReadFile("Folder\\Outputs.xml")).Return(false);
 }
Beispiel #18
0
 public void SetUp()
 {
     fileController = MockRepository.GenerateMock <IFileController>();
     fileController.Stub(f => f.DirectoryExists("Folder")).Return(true);
     fileController.Stub(f => f.CanCreateFilesIn("Folder")).Return(true);
 }
        public void SetUp()
        {
            bytes = new byte[] { 0, 1, 2 };

            fileController = MockRepository.GenerateMock<IFileController>();
            fileController.Stub(f => f.DirectoryExists("Folder")).Return(true);
            fileController.Stub(f => f.CanCreateFilesIn("Folder")).Return(true);
            fileController.Stub(f => f.ReadAllBytes("static.dat")).Return(bytes);
        }
 public void SetUp()
 {
     fileController = MockRepository.GenerateMock<IFileController>();
     fileController.Stub(f => f.DirectoryExists("Folder")).Return(true);
     fileController.Stub(f => f.CanReadFilesFrom("Folder")).Return(true);
     fileController.Stub(f => f.FindAllFilesLike("Folder", "*.apiext.xml")).Return(new string[0]);
 }
 public void SetUp()
 {
     fileController = MockRepository.GenerateMock<IFileController>();
     fileController.Stub(f => f.DirectoryExists("Folder")).Return(true);
     fileController.Stub(f => f.CanReadFilesFrom("Folder")).Return(true);
     fileController.Stub(f => f.FindAllFilesLike("Folder", "*.useroption.xml")).Return(new string[0]);
     fileController.Stub(f => f.FileExists(ProjectSerialiserV1.UserOptionsDetailsFileName)).Return(true);
     fileController.Stub(f => f.ReadAllText(ProjectSerialiserV1.UserOptionsDetailsFileName)).Return(Constructing_The_XML_For_The_UserOptions_Details.ExpectedXml);
 }
 public void SetUp()
 {
     fileController = MockRepository.GenerateMock <IFileController>();
     fileController.Stub(f => f.FileExists("ProjectFile.aad")).Return(false);
     fileController.Stub(f => f.CanReadFile("ProjectFile.aad")).Return(false);
 }
 public void SetUp()
 {
     fileController = MockRepository.GenerateMock<IFileController>();
     fileController.Stub(f => f.FileExists("ProjectFile.aad")).Return(false);
     fileController.Stub(f => f.CanReadFile("ProjectFile.aad")).Return(false);
 }
        public void SetUp()
        {
            fileController = MockRepository.GenerateMock<IFileController>();
            fileController.Stub(f => f.DirectoryExists("Folder")).Return(true);
            fileController.Stub(f => f.CanCreateFilesIn("Folder")).Return(true);

            project = MockRepository.GenerateStub<IDesignerProject>();
            project.ProjectName = "Project";
            project.Stub(p => p.Namespaces).Return(new List<string>());
            project.Stub(p => p.References).Return(new List<ReferencedFile>().AsReadOnly());
        }
 public void SetUp()
 {
     fileController = MockRepository.GenerateMock<IFileController>();
     fileController.Stub(f => f.DirectoryExists("Folder")).Return(true);
     fileController.Stub(f => f.CanCreateFilesIn("Folder")).Return(false);
 }
        public void SetUp()
        {
            fileController = MockRepository.GenerateMock<IFileController>();
            fileController.Stub(f => f.DirectoryExists("Folder")).Return(true);
            fileController.Stub(f => f.CanCreateFilesIn("Folder")).Return(true);

            ExtensionMethod = new ApiExtensionMethod(typeof(ApiExtensionTest).GetMethod("Method1"));
        }