Testing For FileExists In VB 6.5

Jun 4, 2009

I'm trying to determine if a file "G:myfilesfile1.txt" exists. Using sample code from numerous web searches I can't make any of the FileSystemObjects work. Seems to me the FSO routines are an add-in to VB. If this is so, how do I add them in?

In noncode, this is what I really want to do:

if "file1.txt" exists AND "file2.txt" exists
if "file1.txt" filedate > "file2.txt" filedate
copy "file2.txt" to "fileold.txt"

[Code].....

View 2 Replies


ADVERTISEMENT

Sql - Unit Testing The Data Access Layer - Testing Update Methods?

May 15, 2009

I'm looking into adding some unit tests for some classes in my data access layer and I'm looking at an update routine that has no return value.It simply updates a row based on the id you provide at whichever column name you provide.Inside of this method, we collect the parameters and pass them to a helper routine which calls the stored procedure to update the table.Is there a recommended approach for how to do unit testing in such a scenario?

View 4 Replies

Difference Between NUnit Testing And Unit Testing In VSTS?

Aug 25, 2009

I use VS team system 2008. At the moment i need to test some business classes, i have found two kinds testing NUnit and the unit testing provided by the VS team system. what are there differences?

View 1 Replies

VS 2008 FileExists Doesn't Work?

Feb 5, 2011

I am trying to take a look at the cache of UT2004 through my application since the information holder contains some bugs sometimes and I know how to fix them.

vb.net
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim totalText As String =

[code].....

View 5 Replies

Computer.FileSystem.FileExists Fails In Windows 7?

Aug 29, 2009

My.Computer.FileSystem.FileExists(g_DbFolder & "MyDB.sdf")returns false for this existing database in Windows 7 64bitYet when I boot back into Vista Ultimate/(rip off) 64bit the database is properly detected.

View 9 Replies

.net - Unit Testing C# InternalsVisibleTo() Attribute For NET 2.0 While Testing?

May 13, 2010

I'm building an Active Directory wrapper in VBNET 2.0 (can't use later .NET) in which I have the following:

IUtilisateur
IGroupe
IUniteOrganisation

These interfaces are implemented in internal classes (Friend in VBNET), so that I want to implement a façade in order to instiate each of the interfaces with their internal classes. This will allow the architecture a better flexibility, etc.Now, I want to test these classes (Utilisateur, Groupe, UniteOrganisation) in a different project within the same solution. However, these classes are internal. I would like to be able to instantiate them without going through my façade, but only for these tests, nothing more.

[Code]...

View 1 Replies

Windows 7 FileExists Error - Get The Drive Letters To Work In The IDE?

Jul 11, 2011

I'm running Visual Studio 2005 SP2 on Windows 7. When I'm in the IDE and execute a My.Computer.FileSystem.FileExists, or DirectoryExists or CopyDirectory, etc. that accesses a network drive using the drive letter (i.e. L:) it thows an error. If I use the full UNC (\computernamesharedfolder) it works. However, if I go into my project's bin folder and run the compiled .exe from there, the drive letters work. I've tried running VS.Net as admin and it makes no difference. How do I get the drive letters to work in the IDE?

View 3 Replies

.net And Jemter Testing?

May 17, 2012

In my project developed for using asp.net with vb.net coding. Now we need to performace testing using the Jmeter tool. we can't able to test because in my application lot of session variable used, Jmeter tool does not support session variables i think.Check with debugging:1.Assign the session(userName) ="abc" then goes to next page, then check value same session vaule as nothing.

View 1 Replies

How To Do Equality Testing

Jan 18, 2012

I have a Do loop that I want to exit once it goes through without making any changes to an object I created. I figured the best way to do this was to create a temporary copy of the object at the beginning of the loop and then compare that to the actual object at the end of the loop to determine whether any changes were made to it. The problem occurs when variables are accessed and copied by reference. I have tried to use some of the methods such as .Clone and .Equals (maybe I shouldn't be using these, but I didn't see any better built-in methods), but I seem to be doing some stuff wrong. Can somebody give me an example of a good way to copy an object for later equality testing, and how to do the equality testing?

View 5 Replies

IDE :: Testing VB DLLs In VB?

Nov 22, 2010

I was once a VB 6 expert, but it's been a while.I am attempting to create a simple DLL in VB. I created a new WCF Service Library, which is what it looks like I needed to do. I filled out the interface and implemented it. Here's the interface:

<ServiceContract()>
Public Interface AgileApi
<OperationContract()>

[code]....

And attempted to call it, but I get System.EntryPointNotFoundException. I've tried pathing the defined library and copying the dll file into the same place where my EXE is, but no change to the error.

View 6 Replies

Testing An UnhandledException

Aug 26, 2010

I'm writing a piece of code to manage the Unhandled exceptions in my VB application.

I'm using the following code

Partial Friend Class MyApplication
Private Sub MyApplication_UnhandledException(ByVal sender As Object, ByVal e As Microsoft.VisualBasic.ApplicationServices.UnhandledExceptionEventArgs) Handles

[Code]....

View 1 Replies

Testing For Null Value?

Aug 13, 2011

when I try to test for a null value using the following:

If not string.isnullorempty(trvlitreadservice.itineraryinfo.reservationitems(zbook).value) then .........

I get an error as soon as it hits a null value. I thought this was supposed to test for a null value yet it throws an error for the very thing I'm testing for.

View 13 Replies

Testing For Time-of-day?

Oct 1, 2011

Private Sub CompareTime3()
Dim NowTime3 As Date
Nowtime3 = (TimeOfDay)

[code].....

In each of the two test sub routines, both if-then statements end up as true and I get both messages boxes displayed ("Timeslot is 16" then "Timeslot is 40" are displayed. One comaprison is AM the other is PM. How can one variable be true for both?

View 8 Replies

Testing In Under Windows 7?

Nov 25, 2009

When i try to run my unit tests in vb.net, visual studio closes down because of an error.I don't know what is causing the problem but i is very frustrating.I have a project running for school that i can't continue because of this problem.When i had visual studio installed under windows vista i didn't got that problem. (same version of visual studio)

View 8 Replies

Testing The .NET Timers?

Apr 25, 2010

Public Class Form1
Dim SW As New Stopwatch
Dim MS As New MenuStrip
Dim Btn As New ToolStripButton

[code]....

View 1 Replies

.net - Static DateTime For Testing?

Dec 11, 2009

We have a DateTime Service that pulls the Database date down when we need to use a Date. Now, If I want to run a test using "Todays" Date using FitNesse, What would be the easiest way of creating a way to have (OurService).CurrentDate be static? We have a control that ads Days,Years, or Months to the current date.. and I would like to be able to test this.

View 1 Replies

Developing A Unit Testing API?

Dec 29, 2010

I have been assigned a task of exploring unit testing using tools available in the market.My question is how do i write an API that would help in writing unit test cases.Example i can use nunit to write something like this to check whether file exists in the given location.

<Test()> _
Public Sub CheckOutputFileInfo()
ReportPath = "D:temp est.txt"

[code].....

View 3 Replies

How To Auto-mated Testing Using Vb

Nov 6, 2011

i need to learn how to do automated testing using visual basic. i already know little bit about visual basic. now how can i do automated testing using vb.any good resource to study about that? even if it a link based resource also fine. and i need your suggestion on how to carry on with testing in visual basic and how to do it well. waiting for your reply.

View 2 Replies

Speed Up The Unit Testing?

Aug 29, 2009

In the project that i;m currently working on i;m not allowed to touch GUI for anyreason that includes program testing. I'm in bit of s frustration becuase prior to this all must application were developed and tested using GUI. Typicvally it wold take a me a week to develop an app now it taking more than that. Especially the TDD with Unit testing. The documentation kills more time too......

View 4 Replies

Sql - .NET, Testing If A Dataset Contains Rows?

Feb 21, 2010

how can I test if a dataset has rows? I'm trying to see if my sql procedure call managed to fill up my dataset.Also, is there an easy way to print the rows to a label?

View 3 Replies

Testing - Are There BDD / TDD Tools For Developing

Oct 28, 2009

I am responsible for rewriting an internal tool for my company. I am currently reworking the most time consuming step to run faster which should give me time to re-think the design of the application for a full rewrite as the interstitial version will meet the current needs. I really want to take this opportunity to implement this code using BDD/TDD but I am new to this method of programming in general and especially within the context of .NET. Are there BDD/TDD tools available for .NET? What resources should I look at?

View 2 Replies

Testing A Mail Server?

Aug 1, 2009

I often get calls from a friend of mine's company saying "ahhh our email is not working!". I thought I could write a program that would test a few things that they could run and have easy answers to my questions when they call. Things like "Is your internet connection alive?", "can you send mail but not receive it?", etc.

[Code]...

View 11 Replies

Testing A Windows Service?

May 15, 2012

1. when testing a service, should I install the exe which is in the bin subfolder or the obj subfolder, and why?

2. when distributing the service, should I use the exe which is in the bin subfolder or the obj subfolder, and why?

View 3 Replies

Testing COM Callable Assembly?

Jul 13, 2009

I have created a COM callable assembly which consists of an Interface, a single class which implements the interface. In this case the implementation is a single method.I have registered the assembly, created a type library and added the assembly to the GAC.I thought about opening an Office application like WORD or EXCEL 2003 and trying it from there but beyong referencing the COM assembly I have no idea how to code it.

View 1 Replies

Testing For Duplicate Records

Aug 11, 2011

I have a windows form application that connects to an access database. When the program is running it connects to the database and populates several textboxes that are bound to the dataset. I have been researching for 2 days and cannot find exactly what..I need, although a few threads have given me a better insight into my dataset. I would like to type text into a textbox that is bound to the primary key and when I tab out of the textbox (lostfocus event) have the program do a quick search of all records in the dataset of the primary key and if a duplicate exists, msgbox the user that that particular text is a duplicate and is not allowed, however if the text is not a duplicate, continue the tab keystroke allowing the cursor to move to the next textbox bound to the database.

View 4 Replies

Testing For Presence Of Table Row?

Nov 20, 2011

I am currently using the following code to check for the presence of an entry in a table. I choose this code because I thought it was a good idea to use a public function to reduce the amount of code required. It works fine until the field I am checking for contains a' character.I realise I need to use a parameter like @name but cannot work out how to pass the correct information to the public function.how to amend my existing code so I can use @staffNo.

Imports System.Data.SqlClient
Dim PaddedStaffNo As String
PaddedStaffNo = (TextBox2.Text.PadLeft(4, "0"c))[code].......

View 1 Replies

Testing If Images Are Equal?

Mar 25, 2010

I want to test if an image in a picturebox is the same to another image in a picturebox?Also, i get my images from a listBox.I need to use i as a conditional in an if statement.

If (picBox2.Image = picBox1.Image) Then
' code ...
EndIf

[code].....

View 5 Replies

Testing Random Numbers?

Feb 26, 2012

I have to create a device that takes a randomly generated number and tests that many numbers against an upper and lower bound. I can't figure out why my code isn't working.This is my code and a screen shot of what it is doing.I think I need a loop but I have never worked with loops and wouldn't know what to do.

Private Sub Report_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnReport.Click, miCalculate.Click
Dim intUp As Integer = GetInput(tbxUp, intUp, "Upper")

[code].....

View 1 Replies

Testing The Value Of An Integer Type In VB

Jun 2, 2010

I have an int datatype in my SQL database table (NULLS allowed).

Three values of this int datatype are significant: NULL, 0 and > 0.

I create a variable with:

Dim IntType as Integer = Nothing

And then, using SQL Linq, transfer the value from the int datatype in the table into the variable.

If the int datatype is NULL, I leave IntType = Nothing.

Now, when I test the value of IntType:

If IntType Is Nothing Then

gives an error because cannot use Is with an integer variable.

So I tried:

If IsDbNull(IntType) Then

is never true, even when IntType is set to nothing.

In fact, if IntType is set to Nothing, whilst debugging, IntType = 0 !!!

View 4 Replies

Unit Testing - Experiences Using Moq With .Net?

Apr 28, 2009

I really like the moq mocking framework. I've used it on several projects. Unfortunately, one of my customers is demanding we use VB.Net. Not my preference, but hey, .Net is .Net, right?I've heard that moq has some trouble with VB. Is this true? Is so, what sorts of trouble? I would expect it to work fine given the language agnostic nature of .Net.

Should I look into using some other mocking framework for use with VB?

View 2 Replies







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