How can i test the MaskedTextBox in Unit Testing?
Hi,
I am develop one sample, in this i am using MaskedTextBox. Now i want to assign value and test that value. How can i assign value and test that?
Regards,
Bhadram.
Hi Bhadram,
Unit test is used for class methods, for the UI control test, I feel that the coded UI test would be better.
>>How can i assign value and test that?
You could use the Keyboard.SendKeys()
method to input the value.
Reference:
https://social.msdn.microsoft.com/Forums/en-US/05b6887c-e0ac-4b9d-8c23-ff913594f2ab/masked-textbox-issue-in-codedui?forum=vsautotest
To test the value, you could use the Assert.AreEqual method.
https://msdn.microsoft.com/en-us/library/microsoft.visualstudio.testtools.unittesting.assert.areequal.aspx
Best Regards,
Jack
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey.
Similar Messages
-
How can I control the execution of a test in TestStand with VeriStand ?
I'm working on a system which triggers warnings. When one of these warnings is triggered, I have to pause the test sequence.
The warnings are declared as alarms in VeriStand and the test procedure is running in TestStand. So I wonder if I could ask the pause of the TestStand running in the VeriStand alarms procedure.
Has someone this answer?Hi AltMarianne,
The response of your question is no.
You can't stop or pause teststand execution from Veristand when one of your alarm is triggered.
It will be possible if from Teststand you called Veristand code module and checked the Alarms 's state.
I hope having answer your question.
Regards.
Aurélien Corbin
National Instruments France
#adMrkt{text-align: center;font-size:11px; font-weight: bold;} #adMrkt a {text-decoration: none;} #adMrkt a:hover{font-size: 9px;} #adMrkt a span{display: none;} #adMrkt a:hover span{display: block;}
Cahiers de vacances de NI
Présentations en ligne : 12 fondamentaux à réviser, du 9 juillet au 29 aoû... -
To test how can we use the opt 'logical file name' to name the file based
Hi Sir/Madam,
to test how can we use the opt 'logical file name' to name the file based on the selection made in the dtp run for extracting data as flat file.Hi Vishali,
In the DTP select the file location as application server and give the logical file path. The actual file and logical path can be created using transaction "FILE" and "AL11".
Rest of the process is same as that of extraction from local file.
Regards,
Durgesh. -
How can I set the United States as my country when opening PSE 10?
How can I set the United States as my country when opening PSE 10 so I don't have to scroll down every time?
Why do you have to scroll down every time? You should only see the country window the very first time you launch PSE after installing it.
-
How can I set the number of test sockets in my program?
How can I set the number of test sockets in my program? I use LabWindows/CVI 6 and TestStand version 2.0.
And I use BatchModel for the parallel UUT running. I didn't found program way to set the number of test socket. I think I should have it. In TestStand I can change the number of test sockets through menu Configure -> Model Options -> number of test sockets (I mean I do it by manual mode).
Thank's a lot.
MariaOne way you can set the number of Test Sockets for your sequence is by overiding the ModelOptions Callback used by your sequence. Select All Sequences from the View drop-down then right click, select Sequence File Callbacks, select the ModelOptions callback and then click on Add. You can then select the Edit button to Edit the ModelOptions for your sequence. You can set other ModelOptions as required also.
RG -
How can I get the Java EE 5 Compatibility Test Suite?
How can I get the Java EE 5 Compatibility Test Suite?
which department should I contact with in oracle company in china ?
Who can tell me?
thanks.The title of this forum is...
Community Feedback and Suggestions (Do Not Post Product-Related Questions Here)
And you thought this was the appropriate place to post this question ?:| -
Org Management - How can I change the start date of all the org units
How can I change the start date of all the org unit objects and its relationships at one shot ? I have created some 100 Org units with the wrong start date. Please suggest.
Thanks in advance..
Cheers
VijayHello Archana,
Thanks a lot... This has solved my issue...
Cheers
Vijay -
How can i convert the quantity of one unit to other unit in BI 7?
Hi ,
I have developed an RFC function module in SAP BW (BI 7.0).
For this function module I have to populate material number and Quantity required and UNIT.Every thing working good. If the user forgets to enter unit or enters other unit where Quantity in ODS is not mentioned in terms of that unit.WE have to Convert the Quantity requested into the Qunantity that exist in ODS or DATA BASE based on the unit of measure .
Please suggest me how can I convert the UNIT of measure of quantity?
Thanks,
Suresh.I have to do this with conversion table /BIO/PMAT_UNIT.
IN THIS TABLE I DON'T KNOW HOW CAN I CONVERT?
REGARDS,
SURESH. -
My iPad was stolen. How can I cancel the iTunes or App Store password to the email account associated with the unit?
Change your apple id password
http://support.apple.com/kb/HE36
Change your email password - this depends on the service you use.
TZ -
My itunes account doesn't list "devices" above the playlist, as the syncing instructions give. How can I sync the itunes I have purchased & downloaded to my computer, to my ipod shuffle? The device is plugged into my computer, but nothing happens. Shouldn't the computer recognize the device? It doesn't. Please help!
As a test, shut down your computer and disconnect ALL USB devices. Do this procedure to Reset the shuffle
http://support.apple.com/kb/HT1655
Start up computer with nothing connected, except for standard keyboard and mouse (if it's not a laptop). Run iTunes. Connect shuffle to a direct USB port on the computer. See if there's any improvement,
If the shuffle is now recognized, there may have been a USB device conflict previously, or maybe all of the devices connected at the same time overloads the USB bus (for power). An iPod charges its battery while connected, so it is a high-power USB device. -
I updated my MacBook Pro with Mountain Lion and now it is slow in starting up and loads a number of probrams. How can I fix the problem?
Have you tried starting in Safe Mode and see if the slowness still occurs?
Restart holding the "shift" key.
(Expect it to take longer to start this way because it runs a directory check first.)
If this works look in System Preferences > Users & Groups > Login items and delete any third party login items (-), you can always add them back with the (+). Also look in /Library/Startup Items. Nothing is put in that folder by default, so anything in there is yours.
Reboot normally and test. -
I have all my music on an external media drive that has crashed. How can I get the music of my ipod touch back onto the comupter without loosing the music when it syncs. in order to start rebuilding my music collection?
You should be able to recover the media with the tips in this post from forum regular Zevoneer but I'm not sure what the implications are for your application settings. You can probably transfer your purchases into a newly authorised library, backup the device, recover any other media using third party tools, then restore the device from the backup. That should switch the assocation of the device to the new library but it is not something I've personally tested.
When you get it all working, make a backup!
tt2 -
How can I make the combo box turn to the value of black.
When the show button is pressed (and not before), a filled black square should be
displayed in the display area. The combo box (or drop down list) that enables the user to choose the colour of
the displayed shape and the altering should take effect immediately.When the show button is pressed,
the image should immediately revert to the black square, the combo box should show the value that
correspond to the black.
Now ,the problem is: after I pressed show button, the image is reverted to the black square,but I don't know
how can I make the combo box turn to the value of black.
Any help or hint?Thanks a lot!
coding 1.
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.event.*;
public class test extends JFrame {
private JPanel buttonPanel;
private DrawPanel myPanel;
private JButton showButton;
private JComboBox colorComboBox;
private boolean isShow;
private int shape;
private boolean isFill=true;
private String colorNames[] = {"black", "blue", "cyan", "darkGray", "gray",
"green", "lightgray", "magenta", "orange",
"pink", "red", "white", "yellow"}; // color names list in ComboBox
private Color colors[] = {Color.black, Color.blue, Color.cyan, Color.darkGray,
Color.gray, Color.green, Color.lightGray, Color.magenta,
Color.orange, Color.pink, Color.red, Color.white, Color.yellow};
public test() {
super("Draw Shapes");
// creat custom drawing panel
myPanel = new DrawPanel(); // instantiate a DrawPanel object
myPanel.setBackground(Color.white);
// set up showButton
// register an event handler for showButton's ActionEvent
showButton = new JButton ("show");
showButton.addActionListener(
// anonymous inner class to handle showButton events
new ActionListener() {
// draw a black filled square shape after clicking showButton
public void actionPerformed (ActionEvent event) {
// call DrawPanel method setShowStatus and pass an parameter
// to decide if show the shape
myPanel.setShowStatus(true);
isShow = myPanel.getShowStatus();
shape = DrawPanel.SQUARE;
// call DrawPanel method setShape to indicate shape to draw
myPanel.setShape(shape);
// call DrawPanel method setFill to indicate to draw a filled shape
myPanel.setFill(true);
// call DrawPanel method draw
myPanel.draw();
myPanel.setFill(true);
myPanel.setForeground(Color.black);
}// end anonymous inner class
);// end call to addActionListener
// set up colorComboBox
// register event handlers for colorComboBox's ItemEvent
colorComboBox = new JComboBox(colorNames);
colorComboBox.setMaximumRowCount(5);
colorComboBox.addItemListener(
// anonymous inner class to handle colorComboBox events
new ItemListener() {
// select shape's color
public void itemStateChanged(ItemEvent event) {
if(event.getStateChange() == ItemEvent.SELECTED)
// call DrawPanel method setForeground
// and pass an element value of colors array
myPanel.setForeground(colors[colorComboBox.getSelectedIndex()]);
myPanel.draw();
}// end anonymous inner class
); // end call to addItemListener
// set up panel containing buttons
buttonPanel = new JPanel();
buttonPanel.setLayout(new GridLayout(4, 1, 0, 50));
buttonPanel.add(showButton);
buttonPanel.add(colorComboBox);
JPanel radioButtonPanel = new JPanel();
radioButtonPanel.setLayout(new GridLayout(2, 1, 0, 20));
Container container = getContentPane();
container.setLayout(new BorderLayout(10,10));
container.add(myPanel, BorderLayout.CENTER);
container.add(buttonPanel, BorderLayout.EAST);
setSize(500, 400);
setVisible(true);
public static void main(String args[]) {
test application = new test();
application.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
coding 2
import java.awt.*;
import javax.swing.*;
public class DrawPanel extends JPanel {
public final static int CIRCLE = 1, SQUARE = 2;
private int shape;
private boolean fill;
private boolean showStatus;
private int shapeSize = 100;
private Color foreground;
// draw a specified shape
public void paintComponent (Graphics g){
super.paintComponent(g);
// find center
int x=(getSize().width-shapeSize)/2;
int y=(getSize().height-shapeSize)/2;
if (shape == CIRCLE) {
if (fill == true){
g.setColor(foreground);
g.fillOval(x, y, shapeSize, shapeSize);
else{
g.setColor(foreground);
g.drawOval(x, y, shapeSize, shapeSize);
else if (shape == SQUARE){
if (fill == true){
g.setColor(foreground);
g.fillRect(x, y, shapeSize, shapeSize);
else{
g.setColor(foreground);
g.drawRect(x, y, shapeSize, shapeSize);
// set showStatus value
public void setShowStatus (boolean s) {
showStatus = s;
// return showstatus value
public boolean getShowStatus () {
return showStatus;
// set fill value
public void setFill(boolean isFill) {
fill = isFill;
// set shape value
public void setShape(int shapeToDraw) {
shape = shapeToDraw;
// set shapeSize value
public void setShapeSize(int newShapeSize) {
shapeSize = newShapeSize;
// set foreground value
public void setForeground(Color newColor) {
foreground = newColor;
// repaint DrawPanel
public void draw (){
if(showStatus == true)
repaint();Hello,
does setSelectedIndex(int anIndex)
do what you need?
See Java Doc for JComboBox. -
How can I see the contents in a Ref Cursor
I have this code:
CREATE OR REPLACE PACKAGE APOD_LOG.APOD_C3_LOG_API_PKG
AUTHID CURRENT_USER
AS
type rc is ref cursor;
PROCEDURE Fetch_Log_Spec
in_LOCAL_IP_VALUE IN BINARY_INTEGER,
out_RESULT_SET OUT rc
END APOD_C3_LOG_API_PKG;
CREATE OR REPLACE PACKAGE BODY APOD_LOG.APOD_C3_LOG_API_PKG
AS
PROCEDURE Fetch_Log_Spec
in_LOCAL_IP_VALUE IN BINARY_INTEGER,
out_RESULT_SET OUT rc
IS
BEGIN
DBMS_APPLICATION_INFO.set_module(module_name => 'APOD_LOG.API_PKG',action_name => 'Fetch_Log_Spec');
DBMS_APPLICATION_INFO.set_client_info(client_info => 'Calling with in_LOCAL_IP_VALUE = ' ||to_char(in_LOCAL_IP_VALUE));
open out_RESULT_SET for
select
in_LOCAL_IP_VALUE as IN_LOCAL_IP_VALUE,
10002 as PORT,
APOD_CORE.UTIL_IP_PKG.IPAddressToIPValue2('''224.168.100.1''') as MULTICAST_IP_VALUE
from
dual
union
select
in_LOCAL_IP_VALUE as IN_LOCAL_IP_VALUE,
10002 as PORT,
APOD_CORE.UTIL_IP_PKG.IPAddressToIPValue2('''224.168.200.1''') as MULTICAST_IP_VALUE
from
dual
union
select
in_LOCAL_IP_VALUE as IN_LOCAL_IP_VALUE,
10002 as PORT,
APOD_CORE.UTIL_IP_PKG.IPAddressToIPValue2('''224.168.100.123''') as MULTICAST_IP_VALUE
from
dual
union
select
in_LOCAL_IP_VALUE as IN_LOCAL_IP_VALUE,
10002 as PORT,
APOD_CORE.UTIL_IP_PKG.IPAddressToIPValue2('''224.168.200.123''') as MULTICAST_IP_VALUE
from
dual;
DBMS_APPLICATION_INFO.set_client_info(client_info => 'Called Fetch_Log_Spec '||to_char(SQL%ROWCOUNT)||' row(s) returned with in_LOCAL_IP_VALUE = '||to_char(in_LOCAL_IP_VALUE) );
END Fetch_Log_Spec;
END APOD_C3_LOG_API_PKG;
And I am trying to test it like this:
DECLARE
IN_LOCAL_IP_VALUE BINARY_INTEGER;
OUT_RESULT_SET APOD_LOG.APOD_C3_LOG_API_PKG.rc;
BEGIN
IN_LOCAL_IP_VALUE := 23374048;
-- OUT_RESULT_SET := NULL; How do I see this
APOD_LOG.APOD_C3_LOG_API_PKG.FETCH_LOG_SPEC ( IN_LOCAL_IP_VALUE, OUT_RESULT_SET );
END;
How can I see the dataset returnd by the OUT_RESULT_SET in SQLPlus or Quest ScriptRunner?A ref cursor doesn't really contain rows but you can use them to reference a SQL statement that fetches the rows.
Re: returning resultset from procedure...or pkg -
How can i set the alternating colors for a table rows
Dear All,
Please any one help me how can i set the Alternating colors for Table Rows.
i created a theam there i set the background alternating color to brown and i set the table design properity to alternating. but it is not reflecting.Hi,
The design property in Table properties should work for your requirement. Select "alternating" value for design.
Please see the API below:
design
Determines the appearance of the table. The property design can take the following values and is represented by enumeration type WDTableDesign.
alternating - The table rows are displayed alternately in a different color.
standard - The table background has one color. The individual table rows are displayed with grid net lines.
transparent - The table background is transparent. The individual table rows are displayed without grid net lines.
Check whether you have changed the right property or not? Also table should contain more than one rows to test this scenario.
Regards,
Jaya.
Edited by: VJR on Jun 17, 2009 6:43 PM
Maybe you are looking for
-
Visibroker gatekeeper will not start in SSL mode on Linux
Has anyone succesfully configured the Visibroker Gatekeeper with SSL on a Linux Platform? All of the installations of 9iAS 1.0.2.2.1 I've performed on a Linux platform install the shared library "libvbj30ssl.so" in the $806_HOME/vbroker/bin directory
-
Hello guys, I have, maybe a problem with a unibody MacBook 2.26Ghz. Many times i have noticed that it is quite silently with his fan, even if some process are taking lot of CPU. For example, my MacBook Pro 13inch mid 2009 is not so silent, cause the
-
Problems when printing Report in Windows XP
Hello Guys, I have a report that works normally in Windows 7, then I installed the Report in a Client Machine with Windows XP System Operation but when he try to print the report, the letters show totally crazy like a japonese letter. Wait for answer
-
I downloaded iTunes 10.6 for installation on a Vista PC. When installing I got error saying I needed a 64 bit installer. I don't see an installation option for 64 bit installer. Can anyone help?
-
Tengo una Fuji S3 Pro e intento usar el "monstruo" de CS2, pero NO soy capaz de abrir un archivo raw de mi camara (extension .RAF). Le he instalado la ultima version del plugin "Camera Raw", exactamente la 3.1. He leido la ayuda, he preguntado por ah