Database in Visual Studio 2015

Just some screenshots:

Advertisements

.Net:a client for an IIS-hosted WCF service

This is the third and last post on the basics of WCF usage. I use SoapUI to consume the WSDL which exposes the single method we created in the first post, and hosted using IIS in the second post. None of this covers how to install SoapUI, although hopefully there is enough here to show you how to use it.


 

At the end of the previous post, we had access to the service wsdl via the link in blue:

WCFinIIS15

Click on the link, and from the URL that comes up next, copy that to the clipboard:

WCFinIIS16.JPG

Start SoapUI, and create a project as shown here. My PC is called [i7], so adjust your entries to match your setup, and then click OK:

WCFinIIS17

After that, the left side panel should look something like this:

WCFinIIS18

Double click [Request 1] and the main panel looks like this:

WCFinIIS19

Just to see what happens, click the green play button in the TLH corner:

WCFinIIS20

If you now put e.g. 101 rather than the default [?], you get…

WCFinIIS21

, which is exactly what we expect and want.

 

Visual Studio 2015: SpecFlow

Dunno why, but installing SpecFlow in Package Manager console works… but then I can’t find the items.

So going here, gives you this:

SFlowDownload01

Same how-tos here and page dedicated to 2015 here.

Install it…

SFlowDownload02

Then when you stop and start VS, you get this:

SFlowDownload03

I had already created a MSTest project inside a console application solution. Before I didn’t have the SpecFlow items, now I do, when I go to add an item:

SFlowDownload04

The first time of asking, we get this:

SFlowDownload05

SFlowDownload06

So easy enough to resolve the SpecFlow reference, now just the NUnit.

This is the app.config for the other project (sic):

SFlowDownload07

And I’ve seen comments saying that you need this line (first for context):

<specFlow>
      <unitTestProvider name="MsTest.2010" />

I dragged the updated app.config into the Unit Test Project, thus…

SFlowDownload08

SFlowDownload09

Also note that the generated file now contains MSTest references, not NUnit references, since we have the new entry in the app.config (the squiggles are because it can’t find a schema for SpecFlow:

SFlowDownload10

Perhaps now I can get to the error I was trying to demonstrate. Oh but first I have to give it some bindings:

SFlowDownload11

So now we have that (PasteBin here)…

SFlowDownload12

Then the test passes…

SFlowDownload13

And then I was playing with the tags trying to get it to break with this error re ScenarioContext and missing key… but I can’t now (get it to break).