本文整理汇总了C#中Loader.GetUserGroups方法的典型用法代码示例。如果您正苦于以下问题:C# Loader.GetUserGroups方法的具体用法?C# Loader.GetUserGroups怎么用?C# Loader.GetUserGroups使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Loader
的用法示例。
在下文中一共展示了Loader.GetUserGroups方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: As_an_unknown_skype_user_I_want_to_have_an_error_message_when_configuration_is_loaded
public void As_an_unknown_skype_user_I_want_to_have_an_error_message_when_configuration_is_loaded()
{
var skype = new Skype(makeMessageProcessor());
var chats = new Chats(skype);
var configurationLoader = new ConfigurationLoader();
var loader = new Loader(new MessengerClient(skype, new UserCollection(new SKYPE4COMLib.UserCollection()), chats),new BuildCollection());
Assert.Throws<UserNotKnowException>(() => loader.GetUserGroups(configurationLoader.Load("UnknownUserPipeline.xml")));
}
示例2: As_A_user_I_want_to_have_a_message_when_a_build_fails_so_that_I_can_fix_the_build
public void As_A_user_I_want_to_have_a_message_when_a_build_fails_so_that_I_can_fix_the_build()
{
var message = "someMessage - " + Guid.NewGuid().ToString();
var skype = new Skype(makeMessageProcessor());
var chats = new Chats(skype);
var configurationLoader = new ConfigurationLoader();
var loader = new Loader(new MessengerClient(skype, new UserCollection(new SKYPE4COMLib.UserCollection()), chats), new BuildCollection());
var projectwatcher = new Projectwatcher(loader.GetUserGroups(configurationLoader.Load("OnePipeline.xml")));
string url = "someUrl";
var httpGet = MockRepository.GenerateMock<IHttpGet>();
httpGet.Expect(x => x.Request(url));
httpGet.Expect(x => x.StatusCode).Return(200);
httpGet.Expect(x => x.ResponseBody).Return(File.ReadAllText("cctray.xml"));
ICcTray ccTray = new CcTray(new EndpointImpl(httpGet, url));
ccTray.Load();
//Test
projectwatcher.Message(ccTray.FailedPipelines());
}
示例3: Skype
public void As_A_user_I_want_to_two_messages_in_the_same_group_window_when_a_build_fails_so_that_I_can_fix_the_builds_when_each_fails()
{
var skype = new Skype(makeMessageProcessor());
var chats = new Chats(skype);
var configurationLoader = new ConfigurationLoader();
var loader = new Loader(new MessengerClient(skype, new UserCollection(new SKYPE4COMLib.UserCollection()), chats),new BuildCollection());
var projectwatcher = new Projectwatcher(loader.GetUserGroups(configurationLoader.Load("OnePipeline.xml")));
string url = "someUrl";
var httpGet = MockRepository.GenerateMock<IHttpGet>();
httpGet.Expect(x => x.Request(url));
httpGet.Expect(x => x.StatusCode).Return(200);
httpGet.Expect(x => x.ResponseBody).Return(File.ReadAllText("cctray.xml"));
ICcTray ccTray = new CcTray(new EndpointImpl(httpGet, url));
ccTray.Load();
//Test
projectwatcher.Message(ccTray.FailedPipelines());
var p = new Project("Trunk_QA_Env_PCIDSS :: Deployment_to_QA_PCIDSS1", "Failed", "Failure", "1.2.3.4","2011-09-23T16:59:18", "web");
ccTray.FailedPipelines().Add(p);
projectwatcher.Message(ccTray.FailedPipelines());
projectwatcher.Message(ccTray.FailedPipelines());
}