add test for processor and non-zero output
authorEugene Petrenko <eugene.petrenko@gmail.com>
Thu, 14 Jul 2011 14:57:18 +0000 (18:57 +0400)
committerEugene Petrenko <eugene.petrenko@gmail.com>
Thu, 14 Jul 2011 14:57:18 +0000 (18:57 +0400)
nuget-tests/src/jetbrains/buildServer/nuget/tests/server/ListPackagesCommandProcessorTest.java

index 000ef00f234edf7265af785840b79f5c6d6df52d..0877e2270b87da1d53a612037b890aad8bdafb13 100644 (file)
@@ -45,6 +45,16 @@ public class ListPackagesCommandProcessorTest extends BaseTestCase {
     Assert.assertTrue(p.getResult().isEmpty());\r
   }\r
 \r
     Assert.assertTrue(p.getResult().isEmpty());\r
   }\r
 \r
+  @Test\r
+  public void test_should_throw_on_exit_code() {\r
+    try {\r
+      p.onFinished(1);\r
+    } catch (RuntimeException e) {\r
+      return;\r
+    }\r
+    Assert.fail("Exception expected");\r
+  }\r
+\r
   @Test\r
   public void test_some_output() {\r
     for(int i =0; i <100; i++) {\r
   @Test\r
   public void test_some_output() {\r
     for(int i =0; i <100; i++) {\r