1. Hector Malpica
  2. miuler-katapotter

Commits

Hector Malpica  committed 7ffd557

cambios menores

  • Participants
  • Parent commits ee37ca6
  • Branches default

Comments (0)

Files changed (5)

File .classpath

View file
  • Ignore whitespace
+<?xml version="1.0" encoding="UTF-8"?>
 <classpath>
-  <classpathentry output="target/scala-2.9.1/classes" path="src/main/scala" kind="src"></classpathentry>
-  <classpathentry output="target/scala-2.9.1/classes" path="src/main/java" kind="src"></classpathentry>
-  <classpathentry output="target/scala-2.9.1/test-classes" path="src/test/scala" kind="src"></classpathentry>
-  <classpathentry output="target/scala-2.9.1/test-classes" path="src/test/java" kind="src"></classpathentry>
-  <classpathentry kind="con" path="org.scala-ide.sdt.launching.SCALA_CONTAINER"></classpathentry>
-  <classpathentry path="/home/miuler/.ivy2/cache/junit/junit/jars/junit-4.10.jar" kind="lib"></classpathentry>
-  <classpathentry path="/home/miuler/.ivy2/cache/org.hamcrest/hamcrest-core/jars/hamcrest-core-1.1.jar" kind="lib"></classpathentry>
-  <classpathentry path="/home/miuler/.ivy2/cache/org.pegdown/pegdown/jars/pegdown-1.1.0.jar" kind="lib"></classpathentry>
-  <classpathentry path="/home/miuler/.ivy2/cache/org.parboiled/parboiled-core/jars/parboiled-core-1.0.2.jar" kind="lib"></classpathentry>
-  <classpathentry path="/home/miuler/.ivy2/cache/org.parboiled/parboiled-java/jars/parboiled-java-1.0.2.jar" kind="lib"></classpathentry>
-  <classpathentry path="/home/miuler/.ivy2/cache/asm/asm/jars/asm-3.3.1.jar" kind="lib"></classpathentry>
-  <classpathentry path="/home/miuler/.ivy2/cache/asm/asm-util/jars/asm-util-3.3.1.jar" kind="lib"></classpathentry>
-  <classpathentry path="/home/miuler/.ivy2/cache/asm/asm-tree/jars/asm-tree-3.3.1.jar" kind="lib"></classpathentry>
-  <classpathentry path="/home/miuler/.ivy2/cache/asm/asm-analysis/jars/asm-analysis-3.3.1.jar" kind="lib"></classpathentry>
-  <classpathentry path="/home/miuler/.ivy2/cache/org.specs2/specs2_2.9.1/jars/specs2_2.9.1-1.12-SNAPSHOT.jar" kind="lib"></classpathentry>
-  <classpathentry path="/home/miuler/.ivy2/cache/org.specs2/specs2-scalaz-core_2.9.1/jars/specs2-scalaz-core_2.9.1-6.0.1.jar" kind="lib"></classpathentry>
-  <classpathentry path="org.eclipse.jdt.launching.JRE_CONTAINER" kind="con"></classpathentry>
-  <classpathentry path="bin" kind="output"></classpathentry>
-</classpath>
+	<classpathentry kind="src" output="target/scala-2.9.1/classes" path="src/main/scala"/>
+	<classpathentry kind="src" output="target/scala-2.9.1/classes" path="src/main/java"/>
+	<classpathentry kind="src" output="target/scala-2.9.1/test-classes" path="src/test/scala"/>
+	<classpathentry kind="src" output="target/scala-2.9.1/test-classes" path="src/test/java"/>
+	<classpathentry kind="con" path="org.scala-ide.sdt.launching.SCALA_CONTAINER"/>
+	<classpathentry kind="lib" path="/home/miuler/.ivy2/cache/junit/junit/jars/junit-4.10.jar"/>
+	<classpathentry kind="lib" path="/home/miuler/.ivy2/cache/org.hamcrest/hamcrest-core/jars/hamcrest-core-1.1.jar"/>
+	<classpathentry kind="lib" path="/home/miuler/.ivy2/cache/org.pegdown/pegdown/jars/pegdown-1.1.0.jar"/>
+	<classpathentry kind="lib" path="/home/miuler/.ivy2/cache/org.parboiled/parboiled-core/jars/parboiled-core-1.0.2.jar"/>
+	<classpathentry kind="lib" path="/home/miuler/.ivy2/cache/org.parboiled/parboiled-java/jars/parboiled-java-1.0.2.jar"/>
+	<classpathentry kind="lib" path="/home/miuler/.ivy2/cache/asm/asm/jars/asm-3.3.1.jar"/>
+	<classpathentry kind="lib" path="/home/miuler/.ivy2/cache/asm/asm-util/jars/asm-util-3.3.1.jar"/>
+	<classpathentry kind="lib" path="/home/miuler/.ivy2/cache/asm/asm-tree/jars/asm-tree-3.3.1.jar"/>
+	<classpathentry kind="lib" path="/home/miuler/.ivy2/cache/asm/asm-analysis/jars/asm-analysis-3.3.1.jar"/>
+	<classpathentry kind="lib" path="/home/miuler/.ivy2/cache/org.specs2/specs2_2.9.1/jars/specs2_2.9.1-1.12-SNAPSHOT.jar"/>
+	<classpathentry kind="lib" path="/home/miuler/.ivy2/cache/org.specs2/specs2-scalaz-core_2.9.1/jars/specs2-scalaz-core_2.9.1-6.0.1.jar"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+	<classpathentry kind="con" path="com.soyatec.uml.CONTAINER"/>
+	<classpathentry kind="output" path="bin"/>
+</classpath>

File .project

View file
  • Ignore whitespace
 <?xml version="1.0" encoding="UTF-8"?>
 <projectDescription>
 	<name>Kata Potter</name>
-	<comment></comment>
+	<comment>@key 32303037303533312D31303030206D69756C65722D6B617461706F747465722F6D69756C6572 </comment>
 	<projects>
 	</projects>
 	<buildSpec>
 			<arguments>
 			</arguments>
 		</buildCommand>
+		<buildCommand>
+			<name>com.soyatec.additional.Builder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
 	</buildSpec>
 	<natures>
 		<nature>fr.obeo.acceleo.gen.ui.acceleoGenNature</nature>
 		<nature>org.scala-ide.sdt.core.scalanature</nature>
 		<nature>org.eclipse.jdt.core.javanature</nature>
+		<nature>com.soyatec.additional.Nature</nature>
 	</natures>
 </projectDescription>

File build.sbt

View file
  • Ignore whitespace
 
 version := "1.0"
 
+
+// ==================================================================
+// DEPENDENCIES
 libraryDependencies += "org.specs2" %% "specs2" % "1.12-SNAPSHOT" % "test"
 
 libraryDependencies += "junit" % "junit" % "4.10"	
 
 libraryDependencies += "org.pegdown" % "pegdown" % "1.1.0"
+// ==================================================================
 
+
+// ==================================================================
+// REPOSITORIES
 resolvers += Classpaths.typesafeResolver
 
 resolvers ++= Seq("snapshots" at "http://oss.sonatype.org/content/repositories/snapshots",
                   "releases"  at "http://oss.sonatype.org/content/repositories/releases")
+// ==================================================================
 

File src/main/scala/com/mdp/potter/LibrosPotter.scala

View file
  • Ignore whitespace
 package com.mdp.potter
 
+/**
+ * @author  miuler
+ */
 class LibrosPotter {
   
   private var libros = Map[Int, Int]()
     canasta(7)*7*8*0.55 + canasta(6)*6*8*0.70 + canasta(5)*5*8*0.80 + canasta(4)*4*8*0.85 + canasta(3)*3*8*0.90 + canasta(2)*2*8*0.95 + canasta(1)*8
   }
   
+  /**
+   * Prueba
+   * @param coleccion
+   * @param _libros
+   * @return
+   */
   private def cantidadLibros(coleccion:Int, _libros:Map[Int, Int]):Map[Int, Int] = {
     if (_libros.keys.size==coleccion) {
       canasta = canasta.updated(coleccion, canasta(coleccion)+1)

File src/test/scala/com/mdp/potter/PotterTest.scala

View file
  • Ignore whitespace
 
 
 @RunWith(classOf[JUnitRunner])
-class PotterTest extends Specification { def is = 
+class PotterTest extends Specification {
+  def doBefore = {println("HOLA")}
+  def is =
 
                                                                                 """
   Harry Potter es una colección de 7 novelas fantásticas escrita por la
       "Compro 2 libros1, 2 libro2, 2 libro3, 2 libro4, 3 libro5," +
       "debe de costar 72,0"              										! e51^
                                                                                 p^
-    "si compras 6 libros diferentes tienes un 30% de descuento"                 ! todo^
+    "si compras 6 libros diferentes tienes un 30% de descuento"                 ^
+      "Compro 3 libros1, 3 libro2, 3 libros3, 3 libros4, 3 libros5, "+
+      "3 libros5 debe de costar 100,8"                                          ! e61^
+    "si compras 6 libros diferentes tienes un 30% de descuento"                 ! pending^
                                                                                 p^
-    "si compras toda la colección tienes un 45% de descuento"                   ! todo^
+    "si compras toda la colección tienes un 45% de descuento"                   ! pending^
                                                                                 end
 
   def e11 = {
     libros.libro5 = 3
     libros.costo must_== 72.0
   }
-  
+
+  def e61 = {
+    val libros = new LibrosPotter
+    pending
+  }
   
 }