Proofs: . TestData Attached with indications Code
Verified
Added on 2023/04/06
|12
|2113
|258
AI Summary
Contribute Materials
Your contribution can guide someone’s learning journey. Share your
documents today.
Proofs: TestData Attached with indications Code Attached in zip folder with name AssessmentofStudentId.zip Videos attached with name both in zip and rar folder as Order_Video at the end Introduction: The project is considered with the requirements, as user will be having two folders with the name took predefined folder names as ‘UserIndicateFolder1’,’ UserIndicateFolder2’ and if the user is fetching document from first folder with the name ‘UserIndicateFolder1’ the text will be displayed and user can see the text and if the document is fetched from second folder with the name ‘UserIndicateFolder2’ document with in the folder will not return any text and it will throw exception saying choose file from first folder with name ‘UserIndicateFolder1’ . And here I am handling and attaching only doc files to view the results and test data for the project is here. These two folders have to be saved in the path ‘C:\User Folders\’ . Below zipped folder extract in the path ‘C:\User Folders\’ Videos:video consist of 3 minutes performance having end to end details about unit test and code how will be running in website with iis. To tun this code IIS need to be enable in the system. Video attached at the end with the name Order_Video.rar .Attached zip file too for videos Code :Also attached at the end of the page with the nameAssessmentStudentID.zip First will go through Visual Studio and Development Methodologies Visual Studio is Microsoft product where we can develop windows and web applications. Windows application required .exe file to run the solution and web application will be hosted in IIS with specific http or https requests. In specific versions we have different type of editions like professional , community and etc. Community edition is free to download and good to learn and practice programs. The latest version of Visual studio is 2019. But the current project for this assignment is done in Visual studio 2017. Will go through one by one to understand Visual studio how we will develop web applications, as this assignment can be done either in windows or web application. I have preferred to do in web applications Graphical User Interface development and testing can be performed/Abstract Here we will see how to develop visual studio with the new webform project as I am using webforms with asp.net application and c# coding which is basic start for developer to start here for webapplications To start development of the project first we will start with the below steps Step 1: Click on File from Menu Bar -> For to New -> Select Project and after selecting project immediately one pop up will open where you can choose windows or web appliactions and so on , but as per the reqirement and my thingking have choosen Web application with C# development
Secure Best Marks with AI Grader
Need help grading? Try our AI Grader for instant feedback on your assignments.
Step 2 : After click of project in above Screen 1 select Web and ASP.Net web application. Give the name as ‘AssessmentofStudentId’. Browse the path to save your application and click on ok Step 3 : I have Selected Empty Project and in check box select Webforms, also select the Add unit tests for unit test cases from check box as shown in the below screen Screen Shot and Click on Ok.
Step 4 : Right Click Solution Click on Add and select Web Forms will open popup change the name to the Web Form as you wish After Adding WebForm the project I have created will be displayed as below: In the application the concept is only first folder document data will be load in the text box and even if you try to change the second folder and load the data in the doc it will not load. The exception
here it is given is either after load of page by using ctrl+F5 or ctrl+R it will be allowing you to load the text in textbox with the format of five terms in each line by using doubly linked list (DLL concept). To add new class right click on the project and add class. For AssesmentStudentId.tests project add the AssessmentStudentId dll to call methods in this project for testing purpose Below are the development methodologies Microsoft.Office.Interop.Word – This is the Microsoft dll used to read the content of the document file and this is used for all word documents to read. In the project I am using this when attaching file to read the content of file as below. The methods and procedure related to this is used as below classes. //ApplicationClassusinginteropwordtoreadword documents Application_worddoc=newApplication(); //ObjectclassforDocument Document_document=newDocument(); system.IO – This can be used to read and write data to the files, for delegate and class and structure will be defined using this IO , in the project all the classes will be targeted from this IO namespaces. Dynamic – This is the datatype which will be defined the data type based on the runtime value, for example if you are passing runtime as 1 it will take as int or if passing ‘2019-01-01’ then it will take as date. Below is the sample code for this dynamicempty= System.Type.Missing; dynamic_filepath= Path.GetFullPath(FileUploads.PostedFile.FileName); Now we started with doubly linked list concept to split the document and insert data in text box with five terms in single line and the code as below Doubly Linked List : This doubly linked list in the project is used to insert string value before or after or last , these methodNames is specifically every developer have to consider for naming specific understanding what method is performing. Methods also described as below: InserFront() : This will search for previous Node to be null and searches is list have data to insert front of the doubly linked list and below is the code for insertfront publicvoidInsertFront(DoublyLinkedListdoublyLinkedList,stringdata) { DoublyNodenewNode=newDoublyNode(data); newNode.next= doublyLinkedList.head; newNode.previous=null; if(doublyLinkedList.head!=null) { doublyLinkedList.head.previous= newNode; } doublyLinkedList.head=newNode; } InsertBefore() : This will be when you are giving previous node address and data will be inserted next to the previous node. publicvoidInsertBefore(DoublyNodenextnode,stringdata) {
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
if(nextnode!=null) { DoublyNodenewNode=newDoublyNode(data); newNode.previous=nextnode.previous; nextnode.previous=newNode; newNode.next= nextnode; if(newNode.previous!=null) { newNode.previous.next= newNode; } } } InsertLast(): This will search for the last node and will try to fetch last node to insert data at the end publicvoidInsertLast(DoublyLinkedListdoublyLinkedList,stringdata) { DoublyNodenewNode=newDoublyNode(data); if(doublyLinkedList.head==null) { newNode.previous=null; doublyLinkedList.head= newNode; return; } DoublyNodelastNode= GetLastNode(doublyLinkedList); lastNode.next= newNode; newNode.previous= lastNode; } StringBuilder – is the string which is used to append the text in the next line as this is the best way to append strings in each line. publicstringPrintList(DoublyLinkedListdoublyLinkedList) { stringsb =string.Empty; DoublyNoden = doublyLinkedList.head; while(n !=null) { sb= sb!=string.Empty? sb+ n.data+" ": n.data+" "; n= n.next; } returnsb; } btnLoad_Click – is the event generated for button click to display text how ever use is excpecting. Try catch exception are used to perform error handling and Document and Application classes is to read word document. protectedvoidbtnLoad_Click(objectsender,EventArgse) { try { //ObjectclassforDocument Document_document=newDocument(); //ApplicationClassusinginteropwordtoreadword documents Application_worddoc=newApplication();
j =j + 5; stringsbs= _lineDLL.PrintList(myLinkedList); sbb.AppendLine(sbs); } txtAreaResult.Text= sbb.ToString(); } catch(Exceptionex) { txtAreaResult.Text="An erroroccurredcontactadministrator or uploadfileformonlyUserIndicateFolder1"; } } About Unit testing in the Project andTest Values of boundary values and cases and Reports of test coverage as below: Considered doubly linked list (DLL) as indepth testing is performed here and will explain in detail As a part of development methodologies it is performed by selecting unit test checkbox. How the node will be inserting before, after, last has been tested in these values and cases as performed with the attached test scenarios and develop tests also attached here: As below screen shot .tests project has been created and UnitTest1.cs class is added as showing here: To Run or debug tests follow steps go to Test -> Windows -> TestExplorer , then you can see the Test explorer as shown here:
Secure Best Marks with AI Grader
Need help grading? Try our AI Grader for instant feedback on your assignments.
Now we will go to InsertFront() Method considering the text as excpected and actual as both has to be equal. After executing this insertfront() with hard coded different values it has to match with the excpected value and same way we have use different methods for InsertLast(), InsertAfter() by using next node as below highlighted To run the tests we have two different way can be run by individual tests or run all option both can be used which will be shown in vide and here for reference highlighting.
And for Debug individual tests .Right Click Method -> Debug Individual test method White box testing White box testing is a testing which developer will be performing and indepth about functionality and fields declared for the purpose , will include unit testing . Have to perform all input and output values and no need to wait for GUI to be completed here. All the controls will be validated here, functional changes , and integration testing changes. Tester will be usually peform Black box testing and developer will usually performs white box testing. TextBox return values and the expected values have to match for functional testing, calculations of each functionality performance of testing. This will beyond the user-interface it means indepth testing is performed. Methods of DLL We have different type of linked list in c# like single linked list, double linked list and double circular linked list Node : head of this will have data, next and previous node
Previous Node : At the initial stage of insertion it will be having null value. Next Node : At the last stage of insertion it will be having null value. Doubly linked List Class : Will be having different methods InsertAfter, InsertBefore, and InsertLast , GetLastNode these are implemented in the current project Usually we will be having some more methods also like DeleteNodeByKey, and GetNodeAddress. The first Link will always points for the previousNode here and Last Link will always be pointing to Nextnode To insert value to next node you have to know the previous node address to insert properly data or to delete properly data Unit testing in C# Unit test can be done in NUnit and .Net Core. Unit testing in C# is which developer will be performing. Unit tests need to be separated from the integration tests. TestClass is the Attribute and TestMethod is the methos which will be there in MS test tools. First thing Below attached is the code video Code of the Project is attached with below zip file Screenshots of output of the application Screen Load of 1stScreen
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
After load will attach document from first folder of user folder so that text is getting displayed as out put in text box with five terms in each line When user attach file form second folder form user folders text box will have exception message and attached is the screen shot