有人知道在.net中使用修身的分步教程吗?
现在,我设法在我的localhost:3434上运行了纤薄的fitnesse网站
我在c:\fitSharp中解压缩了fitSharp插件
但我不知道接下来会发生什么
有人知道在.net中使用修身的分步教程吗?
现在,我设法在我的localhost:3434上运行了纤薄的fitnesse网站
我在c:\fitSharp中解压缩了fitSharp插件
但我不知道接下来会发生什么
in your case this will be useful: http://fitsharp.github.com/Slim/GettingStarted.html
else you should consider: http://schuchert.wikispaces.com/Acceptance+Testing.UsingSlimDotNetInFitNesse
FitNesse是一个wiki,包含可以执行以执行系统测试的表。然后,表会告诉FitNesse创建一些类,对它们进行一些操作,并检查结果。
例如,为了使用.NET,您只需要告诉FitNesse如何与.NET链接以及要加载哪些.NET程序集。没有别的。.NET项目可以是一个完全不了解FitNesse的简单类库。
Download FitNesse and fitSharp
(in this example fitSharp has been extracted to D:fitfitSharp
elease.1.9.net.35
)
从命令行启动FitNesse:
java -jar fitnesse.jar -p 8080
创建并编译C#类库项目,使用:
namespace ClassLibrary1
{
public class ShouldIBuyMilk
{
private int _cash;
private int _pintsOfMilkRemaining;
private string _useCreditCard;
public void SetCashInWallet(int cash)
{
_cash = cash;
}
public void SetCreditCard(string useCreditCard)
{
_useCreditCard = useCreditCard;
}
public void SetPintsOfMilkRemaining(int pints)
{
_pintsOfMilkRemaining = pints;
}
public string GoToStore()
{
if (_cash > 0 || _useCreditCard.Equals("yes"))
return "yes";
return "no";
}
}
}
浏览到http://localhost:8080/然后单击标题旁边的[添加子项]并添加测试页面。
键入wiki页面内容,如下所示(更新路径):
!define TEST_SYSTEM {slim}
!define COMMAND_PATTERN {%m -r fitSharp.Slim.Service.Runner,D:fitfitSharp
elease.1.9.net.35fitsharp.dll %p}
!define TEST_RUNNER {D:fitfitSharp
elease.1.9.net.35Runner.exe}
!path D:fitMyFixtureClassLibrary1inDebugClassLibrary1.dll
!|import|
|ClassLibrary1|
|Should I buy milk|
|cash in wallet|credit card|pints of milk remaining|go to store?|
| 0 | no | 0 | no |
| 10 | no | 0 | yes |
| 0 | yes | 0 | yes |
| 10 | yes | 0 | yes |
| 0 | no | 1 | no |
注意!在之前|import|
是为了避免ClassLibrary1被视为wikiword。
Save it, and click "Test" in the left menu. FitNesse will load the assembly, create an instance of your class, set some properties by following the naming convention mapping, and finally check some properties.
As a learning experience I recently tried implementing Quicksort with 3 way partitioning in C#. Apart from needing to add an extra range check on the left/right variables before the recursive call, ...
I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...
I have two EF entities. One has a property called HouseNumber. The other has two properties, one called StartHouseNumber and one called EndHouseNumber. I want to create a many to many association ...
I m using decimal type (.net), and I want to see if two numbers are equal. But I only want to be accurate to 10 decimal places. For example take these three numbers. I want them all to be equal. 0....
I m creating an STA version of the SynchronizationContext for use in Windows Workflow 4.0. I m wondering what to do about exceptions when Post-ing callbacks. The SynchronizationContext can be used ...
I ve got some code which sets up a datacontext. Often enough, the datacontext should be set to some underlying data collection, such as an ObservableCollection - but occasionally I d like to set it ...
I am building an application with C#. I managed to turn this into a single instance application by checking if the same process is already running. Process[] pname = Process.GetProcessesByName("...
NOTE I have asked the related question (with an accepted answer): How to combine DataTrigger and Trigger? I think I need to combine an EventTrigger and a DataTrigger to achieve what I m after: when ...