我有一套6个MSTest测试组件.当我调出Test View窗口并按项目分组时,我的所有项目都显示为save.我似乎无法让Visual Studio了解这个项目是一个单元测试程序集.
Resharper的Unit Test Runner在识别第六个组件时没有问题.所以从那个角度来看组装很好.
Visual Studio 2008如何确定程序集是单元测试程序集?
我比较了csproj文件,没有发现任何异常.
我在TFS 2013中有一个构建配置,可以生成版本化的构建工件.此构建使用开箱即用的流程模板工作流程.我希望在单元测试失败的情况下销毁构建工件,只留下日志文件.我有一个Post-Test powershell脚本.如何在此脚本中检测测试失败?
以下是我的测试后脚本中的相关清理方法:
function Clean-Files($dir){
if (Test-Path -path $dir) { rmdir $dir\* -recurse -force -exclude logs,"$NewVersion" }
if(0 -eq 1) { rmdir $dir\* -recurse -force -exclude logs }
}
Clean-Files "$Env:TF_BUILD_BINARIESDIRECTORY\"
Run Code Online (Sandbox Code Playgroud)
如何在功能中测试测试成功?
我的应用程序中有一个稍微修改过的Mediatr处理命令处理版本。我已经实现了一个 MediatorPipeline,它允许我拥有前处理器和后处理器。
public class AsyncMediatorPipeline<TRequest, TResponse>
: IAsyncRequestHandler<TRequest, TResponse>
where TRequest : IAsyncRequest<TResponse>
{
private readonly IAsyncRequestHandler<TRequest, TResponse> inner;
private readonly IAsyncPreRequestHandler<TRequest>[] preRequestHandlers;
private readonly IAsyncPostRequestHandler<TRequest,TResponse>[] postRequestHandlers;
public AsyncMediatorPipeline(IAsyncRequestHandler<TRequest, TResponse> inner,
IAsyncPreRequestHandler<TRequest>[] preRequestHandlers,
IAsyncPostRequestHandler<TRequest, TResponse>[] postRequestHandlers)
{
this.inner = inner;
this.preRequestHandlers = preRequestHandlers;
this.postRequestHandlers = postRequestHandlers;
}
public async Task<TResponse> Handle(TRequest message)
{
foreach (var preRequestHandler in preRequestHandlers)
{
await preRequestHandler.Handle(message);
}
var result = await inner.Handle(message);
foreach (var postRequestHandler in postRequestHandlers)
{
await postRequestHandler.Handle(message, result);
}
return …Run Code Online (Sandbox Code Playgroud) 我正在研究一些使用System.Diagnostics.Trace类的代码,我想知道如何在Visual Studio中以调试模式运行时以及在调试器外部运行时监视通过调用Trace.WriteLine()写入的内容.
还有其他人在玩rubruby吗?
我已经成功地在IIS 5.1下的本地计算机上运行了IronRuby.Rails.Example项目.我现在正试图以相同的方式运行我自己的demo rails网站.
我的web.config与示例项目略有不同.我试图只使用IronRuby 1.0发布的内容以及使用gem安装的内容.
我收到以下错误,这不会给我很多事情:
D:/demo/config/boot.rb:66:在`exit':exit(SystemExit)
在尝试了许多不同的事情后,我认为找到宝石有问题.我已经附加了我的web配置和ironrack.log.有没有人指出我做错了什么?
谢谢!
<?xml version="1.0"?>
<configuration>
<configSections>
<!-- custom configuration section for DLR hosting -->
<section name="microsoft.scripting" type="Microsoft.Scripting.Hosting.Configuration.Section, Microsoft.Scripting" requirePermission="false"/>
</configSections>
<system.webServer>
<handlers>
<!-- clear all other handlers first. Don't do this if you have other handlers you want to run -->
<clear/>
<!-- This hooks up the HttpHandler which will dispatch all requests to Rack -->
<add name="IronRuby" path="*" verb="*" type="IronRuby.Rack.HttpHandlerFactory, IronRuby.Rack" resourceType="Unspecified" requireAccess="Read" preCondition="integratedMode"/>
</handlers>
</system.webServer>
<system.web>
<!-- make this true …Run Code Online (Sandbox Code Playgroud) 我们有一个 TeamCity 服务器位于合作代理后面。我们使用了几个 Castle 开源库。我想在内部为 Castle 堆栈设置 CI 构建,以便我可以为我们的核心共享库创建依赖构建。一切都很顺利,直到我试图找到 TeamCity 的代理设置。谷歌搜索一无所获。
任何人都可以指出我正确的方向吗?
我正在尝试找出发布包含用户生成的照片的自定义开放图形操作所需的内容.我已通过审批流程,目前正在使用JSSDK进行测试.我有以下代码似乎工作:
FB.api('/me/cheezburger-app:create', 'post', {
meme:'http://cheezburger.com/6459677184'
}, function(response){
console.log(response);
});
Run Code Online (Sandbox Code Playgroud)
我的理解是,要将此作为用户生成的照片发布,我需要做的就是包含一个包含如下对象数组的图像属性:
FB.api('/me/cheezburger-app:create', 'post', {
meme:'http://cheezburger.com/6509097984',
image:[{user_generated:true, url:'https://i.chzbgr.com/completestore/12/8/13/c9Smb0ba2EGTLepkCgEp2g2.jpg'}]
}, function(response){
console.log(response);
});
Run Code Online (Sandbox Code Playgroud)
遗憾的是,这会返回以下错误:
{"error":{"message":"(#3503) \"[{\"user_generated\":true,\"url\":\"https://i.chzbgr.com/completestore/12/8/13/c9Smb0ba2EGTLepkCgEp2g2.jpg\"}]\" is an invalid value for property \"image:url\" with type \"URL\"","type":"OAuthException","code":3503}}
Run Code Online (Sandbox Code Playgroud)
我能够使用图形api资源管理器成功获取要发布的操作,但它没有使用javascript对象和jquery.我假设我在传递额外参数的方式上做错了.但我无法弄清楚是什么.
任何人都知道如何让ASP.NET Dev Server挑战基本的身份验证凭据,而不是假设我当前的登录?
鉴于以下标记,我想检测编辑器何时失去焦点:
<div class="editor">
<input type="text"/>
<input type="text"/>
</div>
<div class="editor">
<input type="text"/>
<input type="text"/>
</div>
<button>GO</button>
Run Code Online (Sandbox Code Playgroud)
编辑:当用户通过输入元素进行选项卡时,每个编辑器div失去焦点(意味着它们在div外面标记)将加载类添加到失去焦点的div.
这个jquery是我期望的工作,但它没有做任何事情:
$(".editor")
.blur(function(){
$(this).addClass("loading");
});
Run Code Online (Sandbox Code Playgroud)
这似乎有效,直到您添加控制台日志并意识到它正在触发输入的每个焦点.
$('div.editor input').focus( function() {
$(this).parent()
.addClass("focused")
.focusout(function() {
console.log('focusout');
$(this).removeClass("focused")
.addClass("loading");
});
});
Run Code Online (Sandbox Code Playgroud)
这是我一直在研究的测试用例的jsfiddle.我知道我在这里缺少一些基本的东西.有人能开导我吗?
编辑:在下面的一些评论之后,我几乎按照我想要的方式工作.现在的问题是检测焦点何时更改到编辑器div之外的某个位置.这是我目前的实施:
function loadData() {
console.log('loading data for editor ' + $(this).attr('id'));
var $editor = $(this).removeClass('loaded')
.addClass('loading');
$.post('/echo/json/', {
delay: 2
})
.done(function () {
$editor.removeClass('loading')
.addClass('loaded');
});
}
$('div.editor input').on('focusin', function () {
console.log('focus changed');
$editor = $(this).closest('.editor'); …Run Code Online (Sandbox Code Playgroud) 我有程序集A和类Z,它继承自程序集B中的类X.现在在一个完全不同的解决方案中,我有程序集C,它使用类Z.
除非程序集C具有对程序集A和B的引用,否则编译器会抱怨.尽管程序集C仍然不直接使用类Z.
这是预期的吗?
在我看来,如果程序集B在运行时丢失,那么东西会爆炸,但在编译时它应该不在乎.
我在这里错过了什么?
我的目标是我可以告诉我的客户端依赖于程序集A中的类Z,但是我可以在另一端完全重新配置我的程序集,并且在升级时对客户端完全没有影响.
我正在开发我的第三个MonoTouch项目,并希望开始认真使用NUnitLite和TinyIoC等第三方OSS.我不确定管理这些依赖项的最佳方法是什么.其中一些项目还没有发布MonoTouch程序集.快速搜索GitHub的"MonoTouch"发现了一些使用OSS的项目.看起来他们直接在项目中包含了依赖的来源,这让我觉得它将成为一个更新的噩梦.
任何人都有一个很好的工作流程他们可以指点我?
.net ×2
asp.net ×1
assemblies ×1
autofac ×1
c# ×1
ironruby ×1
javascript ×1
jquery ×1
json ×1
mediatr ×1
mono ×1
mstest ×1
open-source ×1
powershell ×1
proxy ×1
rack ×1
reference ×1
svn ×1
teamcity ×1
tfs ×1
tfs2013 ×1
tfsbuild ×1
unit-testing ×1
windows ×1
xamarin.ios ×1