C# - Unit Tests In Visual Studio 2010

May 26, 2010

i am trying to create a Unit test for a WinForm in a Visual Studio 2010 project. I add a new "Coded UI Test" to my project, open up the code file, then right click and select "Generate Code for Coded UI Test" -> "Use Coded UI Test builder". I then start my application up, select "Record" on the UI Map control. I run my tests (in this case simply select a textbox, type in a random value, them click a button). I then select "Generate Code" from the UI Map control which generates the code which the test will use. When running this test, i get the error:

Test method
HelloWorldTest.CodedUITest1.CodedUITestMethod1
threw exception:

[Code].....

View 1 Replies


ADVERTISEMENT

Visual Studio - How To Disable Pinging During Tests

Jun 9, 2012

I have a class that uses My.Computer.Network.Ping to get a boolean value on whether a IP address or hostname is reachable.However, when I'm testing that class, I want to disable pinging so that during the test whenever I run the My.Computer.Network.Ping it will always return false or throw some kind of exception.

I have tried the following, but I still get a true returned (meaning, the attempts to disable ping didn't work)

Dim restricited As New System.Net.NetworkInformation.NetworkInformationPermission(System.Security.Permissions.PermissionState.None)
Dim mySocketPermission1 As New SocketPermission(PermissionState.None)
Dim myWebPermission As New WebPermission(PermissionState.None)
myWebPermission.Demand()'

[Code]...

View 1 Replies

.net - Unit Testing In Visual Studio?

Apr 1, 2011

I'm wanting to create a load of unit tests to make sure my stored procedures are working, but i'm failing (i'm new to tests in visual studio).Basically I want to do the following:

<testclass()>
Dim myglobalvariable as integer
<testmethod()>

[code]....

The problem is because the tests don't run sequentially, tests 2 and 3 fail because the global variable isn't set.

View 4 Replies

Get A Documentation For Unit Tests In VS TS?

Aug 27, 2009

When i perform unit testing on routines, using the unit testing framwork provided by VSTS, i need to get a output of the unit test and result on to a document (documentation). how do i do i do this?

View 1 Replies

Stop Unit Tests From Running?

Jun 11, 2010

I would like to prevent all subsequent unit tests from running when certain conditions are met in a unit test. Is this possible in Visual Studio 2005?

View 2 Replies

.NET Unit Tests - Assert.IsTrue Message?

Feb 18, 2011

I'd like to add a message to be displayed in Visual Studio 2010 test results.I can post a message out if the test fails, but not true. Is there anyway to do this? For example:

dim quoteNumber as string = Sales.CreateQuote(foo)
assert.IsTrue(quoteNumber <> "")

'I would like to make this something like this:

assert.isTrue(quoteNumber <> "", falsepart, "Quote number " & quoteNumber & " created")

View 3 Replies

C# :: Stubbing Page.Form For Unit Tests?

Feb 22, 2011

I can create an ASP.NET Page object in my unit tests by subclassing System.Web.UI.Page.However, I cannot find a way to set Page.Form. Adding a form with attribute (runat,server)does not work. Overloading the form in my Subclass does not give the required functionality.

View 3 Replies

.net - Beginning Unit Tests Long After The Project Has Begun?

May 13, 2009

I have taken on a project that has been underway for months. I've yet to ever do unit tests and figured it would be a decent time to start. However, normally unit tests are written as you go and you plan for them when beginning the project. Is it reasonable for me to start now? Are there any decent resources for setting up unit tests without starting a brand new solution (the project is already underway). Using vb.net with VS2005?

View 8 Replies

Visual Studio 2008 Sp1 To Visual Studio 2010 Beta Sp2

Feb 17, 2010

Will i be able to successfully install 2010 beta 2 side by side 2008? because i want to test 2010 features and some development toolkits such as silverlight while i don't want to uninstall my visual studio 2008 professional.

View 2 Replies

.net - Which Version Of Visual Studio 2010 Contains Visual Basic SharePoint Templates

Aug 5, 2011

Does anybody know which version of Visual Studio 2010 contains the full set of Visual Basic SharePoint Templates? I am about to embark on a project to create Visual Web Parts to be used in a SharePoint report.

At the moment I am using Visual Studio 2008 and even though the WSPBuilder is installed none of the relevant SharePoint templates are present.Having searched SO and the web, most advise to install the templates via the Visual Studio command prompt: devenv /installvstemplates

Alas the Visual Studio command prompt is also missing from my VS2008 installation.So, the question remains: which version of VS2010 contains what I need for pain-free SharePoint development? There is a rather large price different between VS2010 Professional and VS2010 Premium, so can anyone tell me if the cheaper version (VS2010 Professional) contains all the Sharepoint templates?

View 3 Replies

IDE :: Adding References In Visual Studio 2010 Beta 2 (Visual Basic)?

Nov 25, 2009

I am just wondering how I can add Direct X references to Visual Basic in Visual Studio 2010 Beta 2. I cant find them in the .NET reference list, or the reference list, or anywhere. I downloaded the Direct X SDK for August 2009, but I can not add the .dll files to the reference list. Is there anything I can do to add them? I need the references for programming reasons.

View 5 Replies

Use OpenGL In Visual Studio 2010 In Visual Basic Project?

Jan 15, 2012

I want to use "OpenGL" in my project. Is it possible to associate it with "Visual Basic" application developed in Visual Studio 2010? If yes then how can we do it.

View 1 Replies

Convert Visual Basic 2010 To Visual Studio Pro 2010?

Apr 20, 2012

I have a project in visual basic 2010 and want to convert it to visual studio 2010 so I don't have to chose the "open with" every time. Is there a tutorial on how to do this?

View 4 Replies

Asp.net - Force Visual Studio 2010 To Use Visual Basic 10?

Mar 9, 2012

To reproduce the error I'm getting:Create a new Visual Studio 2010 ASP.NET web site in Visual Basic, targeting .NET 2.0Type "Public Property Test As String" Observe "Visual Basic 9.0 does not support auto-implemented properties." error Visual Studio 2010 is happy to use VB 10 against .NET 2.0-targeted Windows Forms applications, this only appears to be an issue with ASP.NET.Is there a way to force Visual Studio 2010 to use VB 10 when targeting .NET 2.0?

View 1 Replies

Build 64-bit Visual Basic.NET In Visual Studio 2010?

Jul 6, 2010

have just overlooked something somewhere...I am writing VB.NET stuff in VS2010 on Windows 7 64-bit. It seems to build by default for a 32-bit target, how to I tell it to make a 64-bit executable?

View 2 Replies

C# - Web Matrix Differ From Visual Studio - Is It More Efficient Than Visual Studio To Develop ASP.NET Web Project

Oct 12, 2011

WebMatrix is a web development and deployment tool by Microsoft so how is this compared to Visual Studio? which Use C# Razor Syntax is that more better coding.

[Code]...

View 2 Replies

Compile A Solution In Visual Studio 2005 Which Was Compiled In Visual Studio 6?

Sep 15, 2009

I have to compile projects which was compiled in Visual Studio 6 in Visual Studio 2005. When i compiled i got a set of same error. I opened the project for VS6 by selecting File->open->project/solution and tried to build a solution by Build option but i am getting the following error.

[Code]...

View 7 Replies

Open Visual Studio Express Files With Normal Visual Studio?

Apr 11, 2011

Is it possible to open visual studio express files with normal visual studio?

View 2 Replies

Visual Studio 2010, Outlook 2010 And Windows Application, Return Emails?

Jan 5, 2011

At present I have wrote an application (in-house CRM, vb .net 2010) which allows me to send emails under the selected customer & I categorised these emails.As these are categorised I can return data to display email history in my program by using search criteria:

Dim oMail As Outlook.MAPIFolder = oNS.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderSentMail)
Dim sSearch As String
sSearch = "[Categories] = '" + "[" + tAccount.Text.Trim + "]" + "(" + tShipTo.Text.Trim + ")'"
Dim oItems As Outlook.Items = oMail.Items.Restrict(sSearch)

However the limitation to the above is it only looks at sent items & no other folder.My ideal solution would be to display all email correspondence for a certain contact.

View 1 Replies

VS 2010 Change Version After Install-Visual Studio 2010 Installer

Jun 21, 2010

Well I used the Visual Studio 2010 installer to install my application and I want it to be able to change the version displayed in the in the Add/ Remove Programs (in the Control Panel). How can I do this without going through the install wizard again?

View 3 Replies

Visual Studio 2010 Exporting To Office 2010 Xlsx?

Feb 14, 2011

I need to write from VS 2010 vb.net dataset into a newly created xlsx file.

View 2 Replies

VB 9 (or C# 3) With Visual Studio 2010?

Jun 3, 2010

I'm working on a project started in VB9 (VS 2008) and now I've migrated to VS2010 (VB10) but on the production server the IDE is still VS 2008. On my developement enviroment the code compiles fine, but sometimes, - let's say - I forget an _ at the end of the line which causes the VB9 compiler to throw an error.So the question is, how could I build a project with the VS 2010 IDE but VB9 compiler? Or to force the VB10 compiler into VB9 mode?

View 2 Replies

Developing MS Visual Studio Like Application Using MS Visual Studio 2005

Nov 27, 2009

I have to develop an application using MS Visual Studio 2005 or above with the following objective:

* The application should allow users to create as many new forms as they want and each form should behave like a MS Visual Studio WinForm. By saying that it should be a container for drag and drop of controls from the toolbox that I will develop....

* Once the user design's each screen to his taste by placing various controls on the form, he should be able to save the form as a screen. Of course I have to provide functionality for each of the controls such as if he drags a button on to the form, he should be able to specify what action it has to perfom when clicked when the application is put into run mode. Quite similar to regular windows form button.

* My application should have two modes: a DESIGN MODE, where user can drag, drop controls and specify what they should do when put into RUN MODE. This is quite similar to MS Visual Studio designer.

* Last but not least is to be able to access the application via the browser with the same look and feel his desktop version.

View 2 Replies

Developing MS Visual Studio Like Application Using MS Visual Studio 2005 Or Above?

Nov 26, 2009

I have to develop an application using MS Visual Studio 2005 or above with the following

objective:* The application should allow users to create as many new forms as they want and each form should behave like a MS Visual Studio WinForm. By saying that it should be a container for drag and drop of controls from the toolbox that I will develop....

* Once the user design's each screen to his taste by placing various controls on the form, he should be able to save the form as a screen. Of course I have to provide functionality for each of the controls such as if he drags a button on to the form, he should be able to specify what action it has to perfom when clicked when the application is put into run mode. Quite similar to regular windows form button.

* My application should have two modes: a DESIGN MODE, where user can drag, drop controls and specify what they should do when put into RUN MODE. This is quite similar to MS Visual Studio designer.

* Last but not least is to be able to access the application via the browser with the same look and feel his desktop version.

View 3 Replies

.net - Printing In Visual Studio 2010?

Jan 16, 2011

Now I'm at the end of the first part of my project and now i need to print a voucher with few pre-printing words and 7 fields that comes from a dataset.I try to use *rdlc file on which i made all the necesary layout very good, and the link was very good as well But print NO I did something in *.xaml file very dificult to put controls and make the links.But lets say i will do it, for the moment i have a picture and a label with few words, and I'm trying to print it with the following lines

Dim myPrintDialog As PrintPreviewDialog = New PrintPreviewDialog
Dim myDocument As New PrintDocument
myPrintDialog.Document = myDocument
myPrintDialog.Document.DocumentName = "OrderVoucher.xaml"
myPrintDialog.ShowDialog()

But in the dialog I see only a blank page.Of course I have a mistake in my mentality of building my code but I don't know where is that.I also need to admit that is the first time in my life which I'm trying to print from Visual Studio 2010.Now Please I need the best assistance you can give me.For the moment i want to print in my default Laser printer.But in the final stage i will have to print in an Olivetti PR2 (Bank printer) which will be connected in the com: port.That will be the day if I succeed :)

View 1 Replies

ByVal And Visual Studio 2010 SP1?

Feb 14, 2011

After installing VS 2010 SP1 I noticed that ByVal keyword doesn't automatically appear after declaring Function or Sub parameters. Is it new feature or bug?

View 5 Replies

Change VB6 To Visual Studio 2010 VB?

May 12, 2012

[Code]....

how to change that auto redraw in visual studio since there have an error???

View 1 Replies

IDE :: Navigation Bar With Visual Studio 2010?

Jun 8, 2010

I am using visual basic and when I try to hide Navigation bar, I am not able to, it is disabled.Ok I tried to turned it off going to "all languages", althought I unchecked the setting. It didnt dissapear.

I restarted visua studio, closed all open classes.Ps, It is just visual basic, when i try with c# i can hide and show it.i dont understand what is the difference. I have to remove it because it makes coding too slow

View 2 Replies

IDE :: The Structure Of Visual Studio 2010?

Nov 9, 2010

Each time i type codes in the Visual Basic 2010 IDE (Visual Studio 2010 Ultimate Edition) and compile it to run, i keep getting this nasty error report below

Error 1 The "GenerateResource" task failed unexpectedly.

System.DllNotFoundException: Unable to load DLL 'FileTracker.dll': A dynamic link library (DLL) initialization routine failed. (Exception from HRESULT: 0x8007045A)
at Microsoft.Build.Shared.NativeMethodsShared.InprocTracking.StartTrackingContextWithRoot(String intermediateDirectory, String taskName, String rootMarker)

[code].....

View 1 Replies

IIS For Visual Studio 2010 Ultimate?

Aug 1, 2011

I am about to publish my program and I need IIS for Visual Studio 2010 Ultimate, does anyone where to get it.

View 3 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved