allowing(ps).getPublishSource(); will(returnValue("push-feed"));\r
allowing(ps).getCreateOnly(); will(returnValue(false));\r
\r
- oneOf(myProcessFactory).executeCommandLine(ctx, myNuGet, Arrays.asList(myFile.getPath(), "api-key-guid", "-Source", "push-feed"), myFile.getParentFile());\r
+ oneOf(myProcessFactory).executeCommandLine(ctx, myNuGet, Arrays.asList("push", myFile.getPath(), "api-key-guid", "-Source", "push-feed"), myFile.getParentFile());\r
}});\r
\r
i.createPush(ctx, ps, myFile);\r
+\r
+ m.assertIsSatisfied();\r
+ }\r
+\r
+ @Test\r
+ public void test_command_push_no_source() throws RunBuildException {\r
+ m.checking(new Expectations(){{\r
+ allowing(ps).getNuGetExeFile(); will(returnValue(myNuGet));\r
+ allowing(ps).getApiKey(); will(returnValue("api-key-guid"));\r
+ allowing(ps).getPublishSource(); will(returnValue(null));\r
+ allowing(ps).getCreateOnly(); will(returnValue(false));\r
+\r
+ oneOf(myProcessFactory).executeCommandLine(ctx, myNuGet, Arrays.asList("push", myFile.getPath(), "api-key-guid"), myFile.getParentFile());\r
+ }});\r
+\r
+ i.createPush(ctx, ps, myFile);\r
+\r
+ m.assertIsSatisfied();\r
}\r
\r
@Test\r
allowing(ps).getPublishSource(); will(returnValue("push-feed"));\r
allowing(ps).getCreateOnly(); will(returnValue(true));\r
\r
- oneOf(myProcessFactory).executeCommandLine(ctx, myNuGet, Arrays.asList(myFile.getPath(), "api-key-guid", "-CreateOnly", "-Source", "push-feed"), myFile.getParentFile());\r
+ oneOf(myProcessFactory).executeCommandLine(ctx, myNuGet, Arrays.asList("push", myFile.getPath(), "api-key-guid", "-CreateOnly", "-Source", "push-feed"), myFile.getParentFile());\r
}});\r
\r
i.createPush(ctx, ps, myFile);\r
+\r
+ m.assertIsSatisfied();\r
}\r
\r
}\r