public void FileSystemPackagePropertiesTest2() { fileSystemPackage = new FileSystemPackage("IUDICO/TestingSystem/Models/VOs/"); Assert.AreEqual(fileSystemPackage.CourseID, default(int)); Assert.AreEqual(fileSystemPackage.FileName, default(string)); Assert.AreEqual(fileSystemPackage.FolderPath, "IUDICO/TestingSystem/Models/VOs/"); Assert.AreEqual(fileSystemPackage.Owner, default(long)); Assert.AreEqual(fileSystemPackage.UploadDateTime, null); }
/// <summary> /// Loads the last deployed version of all applications. /// </summary> public IEnumerable <Application> Load() { List <Application> applications = new List <Application>(); foreach (FileSystemApplication application in this._repository.GetApplications()) { Logger.Info(this, "Loading existing application " + application.Name + "..."); List <FileSystemPackage> packages = this._repository.GetPackages(application).ToList(); if (!packages.Any()) { Logger.Info(this, "Application " + application.Name + " does not have any packages deployed"); continue; } FileSystemPackage latest = packages.Last(); Logger.Info(this, "Application " + application.Name + " latest package = " + latest.Version.ToString(4)); Application app = this.CreateApplication(application.Name); app.LoadFrom(latest.Directory); app.Init(new ServerContext(app, this)); applications.Add(app); } return(applications); }
public void FileSystemPackageTestsSetUp() { fileSystemPackage = new FileSystemPackage("IUDICO/TestingSystem/Models/VOs/", 12345, new DateTime(2011, 11, 11), "package.zip", 1); }