@@ -1,11 +1,9 @@
/*
* Author: Ellie Peterson
* @author: Ellie Peterson
* @version: 0.0.1
* Project: Autotester for wecounsel auto testing with Json API
* Purpose: The goal of this application is to automate user testing on the WeCounsel application
*
*
*
*
*/

#ifndef __UserID_H_INCLUDED__
@@ -17,13 +15,54 @@
class UserID {
public:

/**
* Constructor
* Constructs a new UUID from the given inputs and the current time
* @param: string user_domain - holds the domain to test on
* @param: string test_type - holds the type of test being created
* @param: string user_type - holds the user type i.e. Provider, Client, or Admin
*/
UserID(std::string user_domain, std::string test_type, std::string user_type);

/**
* Constructor
* Constructs a new UUID from the uuid passed to the Constructor
* @param: uuid is passed to constructor
*/
UserID(std::string uuid);

/**
* Constructor
* Constructs a new UUID from the uuid passed to the constructor
* @param: uuid is passed to the constructor
*/
UserID(unsigned long uuid);

/**
* Copy Constructor
* Constructs a new UUID from the given inputs and the current time
* @param: string user_domain - holds the domain to test on
* @param: string test_type - holds the type of test being created
* @param: string user_type - holds the user type i.e. Provider, Client, or Admin
*/
UserID(const UserID &obj);

/**
* Default Destructor
* destroys the object created by a constructor
*/
~UserID();

/**
* Getter for the uuid
* @return string representing the uuid. Returned in a "readable format"
*/
std::string getIDasString();

/**
* Getter for created uuid.
* @return unsigned long integer holding the uuid
*/
unsigned long getIDasLong();

void createFromID();
@@ -35,6 +74,16 @@ class UserID {
std::string m_time;
unsigned long m_id;

/**
* Generates a new UUID from the given inputs and the current time
* range: 00000000 - FFFFFFFF ; 0000 0000 0000 0000 0000 0000 0000 0000 - 1111 1111 1111 1111 1111 1111 1111 1111
* | a7 a6 a5 a4 a3 a2 a1 a0 |-| a7 a6 a5 a4 a3 a2 a1 a0 |
* a7-a6: represents domain
* a5-a4: represents user type
* a3-a2: represents test type
* a1-a0: represents time at creation
*
*/
void generateNewUserID();
}

@@ -1,11 +1,9 @@
/*
* Author: Ellie Peterson
/**
* @author: Ellie Peterson
* @version: 0.0.1
* Project: Autotester for wecounsel auto testing with Json API
* Purpose: The goal of this application is to automate user testing on the WeCounsel application
*
*
*
*
*/

//#include <curl/curl.h>
@@ -26,7 +24,7 @@ vector<string> input_responses = NULL;


/* START MAIN CLASS */
/*
/**
* function: initializes the program and sets the environment
* @return int for status
* @param argc count of arguments passed into program
@@ -39,7 +37,6 @@ vector<string> input_responses = NULL;
--new, --n
--add, --a
--remove, -r
-file, -f <options> [file] : Sets program to read history from file
options:
--csv, --c :indicates file is csv (DEFAULT)
@@ -88,12 +85,11 @@ int main(int argc, char* argv) {

/* START HELPER FUNCTIONS */

/*
* name: printWelcome
* desc: print welcome on start up
/**
* Prints the welcome message to to terminal
*/
void printWelcome() {
cout << "Copywrite Ellie Peterson 2017; source only available to approved employees of WeCounsel." << endl << endl << endl;
cout << "Copyright Ellie Peterson 2017; source only available to approved employees of WeCounsel." << endl << endl << endl;
cout << "Welcome to user gen for WeCounsel, ltd." << endl;
cout << "The only required information is the issue you are testing, and the type of user to be testing on" << endl;
cout << "With that, the program will do the rest, including building a Unique user id, first name, last name, and email" << endl;
@@ -103,8 +99,8 @@ void printWelcome() {
}

/*
* name: printMenu
* desc: print menu for options
* Prints the menu for options
* @param choice is used to determine which input type to list
*/
void printMenu (int choice) {
if (choice == 1) {
@@ -124,8 +120,8 @@ void printMenu (int choice) {
}

/*
* name: inputPrompt
* desc: print and recieve input
* Prints and recieve input
* @param choice used to determine which promp to use
* @return: vector<string> holds input
*/
vector<string> inputPrompt(int choice) {
@@ -145,7 +141,7 @@ vector<string> inputPrompt(int choice) {
//cout << "Email base: " << endl;
//cin >> in;
//input_responses.push_back(in);
} else if (choice == 2) {
} else if (choice == 2) { //No specified test case
cout << "Domain to test on(for specific portal testing)" <, endl;
cin >> in;
input_responses.push_back(in);
@@ -166,10 +162,9 @@ vector<string> inputPrompt(int choice) {
}

/*
* name: buildEmail
* desc: builds email to POST to server
* Builds email to POST to server
* @return: string email - holds input
* @param: vector<string>
* @param: in vectpr that holds input values
*/
string buildEmail(vector<string> in) {
//string email = in[3];