Exemplo n.º 1
0
	public void Game(string path){
		//Terminamos de cargar los objetos nos vamos a la scene de juego Creo un GameObjectGenerator que se encargara de revisar los XML, crear los objetos necesarios y popular el singleton GameObjectCollection
		CollectionGenerator cg = new CollectionGenerator();
		Load.path = path;
		cg.ReadCoreXML (path);

		//Terminamos de cargar los objetos nos vamos a la scene de juego
		this.Scene (2);

	}
		public void creates_postman_collection()
		{
			// Arrange
			var codeBase = new Uri(Assembly.GetExecutingAssembly().CodeBase);
			var assemblyFilePath = codeBase.LocalPath;

			var generator = new CollectionGenerator();

			// Act
			var actual = generator.Create(assemblyFilePath, Resources.DefaultEnvironmentKey, Resources.DefaultRouteTemplate);

			// Assert
			var jsonSerializer = new JsonSerializer() { ContractResolver = new CamelCasePropertyNamesContractResolver() };
			Debug.WriteLine(JObject.FromObject(actual, jsonSerializer).ToString());

			actual.Should().NotBeNull();
			actual.Requests.Count.Should().Be(_requestCount);
			actual.Folders.Count.Should().Be(_folderCount);
			actual.Description.Should().NotBeNull();
		}
		/// <summary>
		/// Builds a Postman collection from an assembly XML documentation file and writes the result to a json file.
		/// </summary>
		/// <returns></returns>
		public override bool Execute()
		{
			Condition.Requires(AssemblyFilePath).IsNotNullOrEmpty();
			Condition.Requires(OutputDirectory).IsNotNullOrEmpty();
			Condition.Requires(EnvironmentKey).IsNotNullOrEmpty();

			LogMessage(Resources.GeneratingPostmanCollection, AssemblyFilePath);

			var generator = new CollectionGenerator();
			var collection = generator.Create(AssemblyFilePath, EnvironmentKey, RouteTemplate);

			if (!collection.Folders.Any())
			{
				LogWarning(Resources.NoApiControllerClassesFound);
			}

			WriteFile(collection, OutputFilePath);

			LogMessage(Resources.PostmanCollectionCreated, OutputFilePath);

			return true;
		}
Exemplo n.º 4
0
 public RepositoryBaseTest()
 {
     _collectionGenerator = new CollectionGenerator();
 }