GithubHelp home page GithubHelp logo

nunit-csharp-samples's Introduction

nunit-samples-csharp

Samples of NUnit Usage in C#

  • money Implementation and tests of a currency conversion class
  • syntax Examples of NUnit syntax in C#
  • ExpectedExceptionExample Shows how to implement a custom attribute for NUnit
  • TimeoutRetryAttributeExample Shows how to implement a custom retry attribute for NUnit that will be triggered only in case of timeout (useful with flaky tests due to poor network connection)

nunit-csharp-samples's People

Contributors

charliepoole avatar chrismaddock avatar hoekstraa avatar imfrancisd avatar lukzas avatar osiristerje avatar rprouse avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nunit-csharp-samples's Issues

How can I run the test?

I am new to c#. Try to run the test. Where is the main function? Please advise.

Can you update the read me for some one new to c#?

Should samples work in VS 2015 Community Edition?

Hello!

I downloaded this repo as a .ZIP, extracted it, and then opened up the nunit-csharp-samples-master\syntax\cs-syntax.sln file in Visual Studio 2015 Community Edition. It built just fine (no compile time errors), but when I brought up the Test Explorer & clicked on "Run All" the Test Explorer window remains blank/empty.

Same thing with the 'Money' demo.

Are these supposed to work 'out of the box' like this, or am I missing something?
(I'm guessing that I'm missing something, but I'd appreciate any advice / pointers / links that could help set me straight).

In case it's helpful, here's my VS info:

Microsoft Visual Studio Community 2015
Version 14.0.25123.00 Update 2
Microsoft .NET Framework
Version 4.6.01055

Installed Version: Community

Visual Basic 2015   00322-20000-00000-AA441
Microsoft Visual Basic 2015

Visual C# 2015   00322-20000-00000-AA441
Microsoft Visual C# 2015

Visual C++ 2015   00322-20000-00000-AA441
Microsoft Visual C++ 2015

Application Insights Tools for Visual Studio Package   5.209.60613.1
Application Insights Tools for Visual Studio

ASP.NET and Web Tools 2015 (RC1 Update 1)   14.1.20203.0
ASP.NET and Web Tools 2015 (RC1 Update 1)

ASP.NET Web Frameworks and Tools 2012.2   4.1.41102.0
For additional information, visit http://go.microsoft.com/fwlink/?LinkID=309563

ASP.NET Web Frameworks and Tools 2013   5.2.40314.0
For additional information, visit http://www.asp.net/

Azure App Service Tools v2.7.1   14.0.11112.0
Azure App Service Tools v2.7.1

Common Azure Tools   1.7
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

GitHub.VisualStudio   1.0
A Visual Studio Extension that brings the GitHub Flow into Visual Studio.

JavaScript Language Service   2.0
JavaScript Language Service

JavaScript Project System   2.0
JavaScript Project System

Microsoft Azure Mobile Services Tools   1.4
Microsoft Azure Mobile Services Tools

NuGet Package Manager   3.4.4
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

PreEmptive Analytics Visualizer   1.2
Microsoft Visual Studio extension to visualize aggregated summaries from the PreEmptive Analytics product.

Python Tools for Visual Studio   2.2.40315.00
Python Tools for Visual Studio provides IntelliSense, projects, templates, Interactive windows, and other support for Python developers.

Python Tools for Visual Studio - Django Integration   2.2.40315.00
Provides templates and integration for the Django web framework.

Python Tools for Visual Studio - Profiling Support   2.2.40315.00
Profiling support for Python projects.

SQL Server Data Tools   14.0.60311.1
Microsoft SQL Server Data Tools

TypeScript   1.8.29.0
TypeScript tools for Visual Studio

Create CI Build for C# Samples

This is a two-pronged effort.

  1. We do need a CI Build for these samples
  2. We'd like to standardize how we do our builds across various projects and this serves as another data point for what works and what does not.

Error in ExpectedException Sample

Reported in email by @bbgbear

In you samples the ExpectedException attribute does not seem to function as expected.
The following test will pass
[Test]
[ExpectedException(typeof(FileLoadException))]
public void HandlesArgumentExceptionAsType()
{
FileStream fs = File.Open(@"c:\foo.foo", FileMode.Open, FileAccess.Write);
}

GetExceptionMessage examples?

Hi,
I could not find any examples of using the callback to get the exception message. It would be very helpful to include a few examples of this.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.