SlideShare a Scribd company logo
Refactoring: A Brief Introduction
Refactoring ,[object Object],[object Object]
An Example with NUnit #region Using using NUnit.Framework; #endregion namespace com.sds.prime { [TestFixture] public class PrimeTest { [Test]  public void testMethod() {  Prime prime = new Prime(); } } }
An Example with NUnit ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Run Test with NUnit plugin
Run Test with NUnit plugin ,[object Object],[object Object],[object Object]
An Example with NUnit #region Using using NUnit.Framework; #endregion namespace com.sds.prime { [TestFixture] public class PrimeTest { [Test]  public void testMethod() {  Prime prime = new Prime(); Assert.IsTrue(prime.getNext(1) == 1); } } }
An Example with NUnit ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Run Test with NUnit plugin
Run Test with NUnit plugin ,[object Object],[object Object],[object Object]
An Example with NUnit #region Using using NUnit.Framework; #endregion namespace com.sds.prime { [TestFixture] public class PrimeTest { [Test]  public void testMethod() {  Prime prime = new Prime(); Assert.IsTrue(prime.getNext(1) == 1); Assert.IsTrue(prime.getNext(2) == 2); } } }
An Example with NUnit ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Run Test with NUnit plugin
Run Test with NUnit plugin ,[object Object],[object Object],[object Object]
An Example with NUnit #region Using using NUnit.Framework; #endregion namespace com.sds.prime { [TestFixture] public class PrimeTest { [Test]  public void testMethod() {  Prime prime = new Prime(); Assert.IsTrue(prime.getNext(1) == 1); Assert.IsTrue(prime.getNext(2) == 2); Assert.IsTrue(prime.getNext(10) == 23); } } }
An Example with NUnit ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
An Example with NUnit ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Run Test with NUnit plugin
Run Test with NUnit plugin ,[object Object],[object Object],[object Object]
An Example with NUnit ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
An Example with NUnit ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Run Test with NUnit plugin
Run Test with NUnit plugin ,[object Object],[object Object],[object Object]
Testing Boundary Conditions ,[object Object]
Refactoring ,[object Object],[object Object]
Smells ,[object Object]
Code Smells ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Smell:Comments ,[object Object],[object Object],[object Object]
Smell:Long Methods ,[object Object],[object Object]
Smell:Large Class ,[object Object],[object Object],[object Object],[object Object]
Smell:Long Parameter List ,[object Object],[object Object],[object Object]
Smell:Inappropriate Intimacy ,[object Object],[object Object],[object Object]
Design Patterns ,[object Object]
Template Pattern ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Design Patterns Explained , ‘ Chapter 19 : The Template Method Pattern’ , by Alan Shalloway and James R. Trott
Template Pattern ,[object Object],aaa aaa aaa aaa bb bb bb bb bb  cccc cccc cccc  d d d d d d d d d eee eee eee eee  fffff ff fffff ff ggg gggg ggg  h hh h hh h hh h iiii iiii iiii iiii  AAA A AAAA A XXX XX XX X BB BB B  cccc cccc cccc  DDD D DDD D EE EEEE E E  fffff ff fffff ff GGG G G GGGG  HHH HHH HH H iiii iiii iiii iiii  Design Patterns Explained , ‘ Chapter 19 : The Template Method Pattern’ , by Alan Shalloway and James R. Trott
Template Pattern ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Design Patterns Explained , ‘ Chapter 19 : The Template Method Pattern’ , by Alan Shalloway and James R. Trott methodForStep1()  { aaa aaa aaa aaa bb bb bb bb bb  } methodForStep3()  { d d d d d d d d d eee eee eee eee  } methodForStep5()  { ggg gggg ggg  h hh h hh h hh h }
Template Pattern ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Design Patterns Explained , ‘ Chapter 19 : The Template Method Pattern’ , by Alan Shalloway and James R. Trott MyClass  { methodForStep1()  { aaa aaa aaa aaa bb bb bb bb bb  } methodForStep3()  { d d d d d d d d d eee eee eee eee  } methodForStep5()  { ggg gggg ggg  h hh h hh h hh h } } MySecondClass  { methodForStep1()  { AAA A AAAA A XXX XX XX X BB BB B  } methodForStep3()  { DDD D DDD D EE EEEE E E  } methodForStep5()  { GGG G G GGGG  HHH HHH HH H } }
Prime Number Template ,[object Object]
Resources ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]

More Related Content

What's hot

Operating System Engineering
Operating System EngineeringOperating System Engineering
Operating System Engineering
Programming Homework Help
 
Laporan ai modul 2-if b 2014-14102055-deprilana ego prakasa
Laporan ai modul 2-if b 2014-14102055-deprilana ego prakasaLaporan ai modul 2-if b 2014-14102055-deprilana ego prakasa
Laporan ai modul 2-if b 2014-14102055-deprilana ego prakasa
Deprilana Ego Prakasa
 
The Ring programming language version 1.8 book - Part 87 of 202
The Ring programming language version 1.8 book - Part 87 of 202The Ring programming language version 1.8 book - Part 87 of 202
The Ring programming language version 1.8 book - Part 87 of 202
Mahmoud Samir Fayed
 
Python unittest
Python unittestPython unittest
Python unittest
Felipe Ruhland
 
Functional Programming in Java - Lessons Learned by GridGain
Functional Programming in Java - Lessons Learned by GridGainFunctional Programming in Java - Lessons Learned by GridGain
Functional Programming in Java - Lessons Learned by GridGain
GridGain Systems - In-Memory Computing
 
SoCal Code Camp 2015: An introduction to Java 8
SoCal Code Camp 2015: An introduction to Java 8SoCal Code Camp 2015: An introduction to Java 8
SoCal Code Camp 2015: An introduction to Java 8
Chaitanya Ganoo
 
Python-nose: A unittest-based testing framework for Python that makes writing...
Python-nose: A unittest-based testing framework for Python that makes writing...Python-nose: A unittest-based testing framework for Python that makes writing...
Python-nose: A unittest-based testing framework for Python that makes writing...
Timo Stollenwerk
 
The Ring programming language version 1.10 book - Part 35 of 212
The Ring programming language version 1.10 book - Part 35 of 212The Ring programming language version 1.10 book - Part 35 of 212
The Ring programming language version 1.10 book - Part 35 of 212
Mahmoud Samir Fayed
 
The Ring programming language version 1.6 book - Part 11 of 189
The Ring programming language version 1.6 book - Part 11 of 189The Ring programming language version 1.6 book - Part 11 of 189
The Ring programming language version 1.6 book - Part 11 of 189
Mahmoud Samir Fayed
 
Mutation Testing: Start Hunting The Bugs
Mutation Testing: Start Hunting The BugsMutation Testing: Start Hunting The Bugs
Mutation Testing: Start Hunting The Bugs
Ari Waller
 
.net progrmming part3
.net progrmming part3.net progrmming part3
.net progrmming part3
Dr.M.Karthika parthasarathy
 
Composing method
Composing methodComposing method
Composing method
С. Ариука
 
Python Functions Tutorial | Working With Functions In Python | Python Trainin...
Python Functions Tutorial | Working With Functions In Python | Python Trainin...Python Functions Tutorial | Working With Functions In Python | Python Trainin...
Python Functions Tutorial | Working With Functions In Python | Python Trainin...
Edureka!
 
Test your code like a pro - PHPUnit in practice
Test your code like a pro - PHPUnit in practiceTest your code like a pro - PHPUnit in practice
Test your code like a pro - PHPUnit in practice
Sebastian Marek
 
Lab5
Lab5Lab5
Python
PythonPython
Verification of Concurrent and Distributed Systems
Verification of Concurrent and Distributed SystemsVerification of Concurrent and Distributed Systems
Verification of Concurrent and Distributed Systems
Mykola Novik
 
Refactoring and code smells
Refactoring and code smellsRefactoring and code smells
Refactoring and code smells
Paul Nguyen
 

What's hot (20)

Operating System Engineering
Operating System EngineeringOperating System Engineering
Operating System Engineering
 
Laporan ai modul 2-if b 2014-14102055-deprilana ego prakasa
Laporan ai modul 2-if b 2014-14102055-deprilana ego prakasaLaporan ai modul 2-if b 2014-14102055-deprilana ego prakasa
Laporan ai modul 2-if b 2014-14102055-deprilana ego prakasa
 
The Ring programming language version 1.8 book - Part 87 of 202
The Ring programming language version 1.8 book - Part 87 of 202The Ring programming language version 1.8 book - Part 87 of 202
The Ring programming language version 1.8 book - Part 87 of 202
 
Python unittest
Python unittestPython unittest
Python unittest
 
Functional Programming in Java - Lessons Learned by GridGain
Functional Programming in Java - Lessons Learned by GridGainFunctional Programming in Java - Lessons Learned by GridGain
Functional Programming in Java - Lessons Learned by GridGain
 
SoCal Code Camp 2015: An introduction to Java 8
SoCal Code Camp 2015: An introduction to Java 8SoCal Code Camp 2015: An introduction to Java 8
SoCal Code Camp 2015: An introduction to Java 8
 
Python testing
Python  testingPython  testing
Python testing
 
Python-nose: A unittest-based testing framework for Python that makes writing...
Python-nose: A unittest-based testing framework for Python that makes writing...Python-nose: A unittest-based testing framework for Python that makes writing...
Python-nose: A unittest-based testing framework for Python that makes writing...
 
The Ring programming language version 1.10 book - Part 35 of 212
The Ring programming language version 1.10 book - Part 35 of 212The Ring programming language version 1.10 book - Part 35 of 212
The Ring programming language version 1.10 book - Part 35 of 212
 
The Ring programming language version 1.6 book - Part 11 of 189
The Ring programming language version 1.6 book - Part 11 of 189The Ring programming language version 1.6 book - Part 11 of 189
The Ring programming language version 1.6 book - Part 11 of 189
 
Mutation Testing: Start Hunting The Bugs
Mutation Testing: Start Hunting The BugsMutation Testing: Start Hunting The Bugs
Mutation Testing: Start Hunting The Bugs
 
.net progrmming part3
.net progrmming part3.net progrmming part3
.net progrmming part3
 
Composing method
Composing methodComposing method
Composing method
 
Python Functions Tutorial | Working With Functions In Python | Python Trainin...
Python Functions Tutorial | Working With Functions In Python | Python Trainin...Python Functions Tutorial | Working With Functions In Python | Python Trainin...
Python Functions Tutorial | Working With Functions In Python | Python Trainin...
 
Test your code like a pro - PHPUnit in practice
Test your code like a pro - PHPUnit in practiceTest your code like a pro - PHPUnit in practice
Test your code like a pro - PHPUnit in practice
 
Lab5
Lab5Lab5
Lab5
 
Pyunit
PyunitPyunit
Pyunit
 
Python
PythonPython
Python
 
Verification of Concurrent and Distributed Systems
Verification of Concurrent and Distributed SystemsVerification of Concurrent and Distributed Systems
Verification of Concurrent and Distributed Systems
 
Refactoring and code smells
Refactoring and code smellsRefactoring and code smells
Refactoring and code smells
 

Viewers also liked

From The Inside Out Slides, 1/16/11
From The Inside Out Slides, 1/16/11From The Inside Out Slides, 1/16/11
From The Inside Out Slides, 1/16/11CLADSM
 
ECEC Research in Norway and Scandinavia: Mapping and appraisal of Scandinavia...
ECEC Research in Norway and Scandinavia: Mapping and appraisal of Scandinavia...ECEC Research in Norway and Scandinavia: Mapping and appraisal of Scandinavia...
ECEC Research in Norway and Scandinavia: Mapping and appraisal of Scandinavia...
EduSkills OECD
 
2011년 6월_ 신상품 및 신규 매체 리포트
2011년 6월_ 신상품 및 신규 매체 리포트2011년 6월_ 신상품 및 신규 매체 리포트
2011년 6월_ 신상품 및 신규 매체 리포트DMC미디어
 
Bad construction
Bad constructionBad construction
Bad constructionlorinchina
 
Key findings from the 2011 edition of Education at a Glance
Key findings from the 2011 edition of  Education at a GlanceKey findings from the 2011 edition of  Education at a Glance
Key findings from the 2011 edition of Education at a Glance
EduSkills OECD
 
Cogapp open studios - Collaborative Spatial Thinking
Cogapp open studios - Collaborative Spatial ThinkingCogapp open studios - Collaborative Spatial Thinking
Cogapp open studios - Collaborative Spatial Thinking
Cogapp
 
Announcements, 1/16/11
Announcements, 1/16/11Announcements, 1/16/11
Announcements, 1/16/11CLADSM
 
Chinglish!!three
Chinglish!!threeChinglish!!three
Chinglish!!threelorinchina
 
Announcements, 3/27/11
Announcements, 3/27/11Announcements, 3/27/11
Announcements, 3/27/11CLADSM
 
숙취해소음료 온라인 행태분석
숙취해소음료 온라인 행태분석 숙취해소음료 온라인 행태분석
숙취해소음료 온라인 행태분석
DMC미디어
 
Announcements, 5/24/15
Announcements, 5/24/15Announcements, 5/24/15
Announcements, 5/24/15CLADSM
 
CommUNITY Slides, 2/10/13
CommUNITY Slides, 2/10/13CommUNITY Slides, 2/10/13
CommUNITY Slides, 2/10/13CLADSM
 
Announcements, 9/20/15
Announcements, 9/20/15Announcements, 9/20/15
Announcements, 9/20/15
CLADSM
 
Syncing our iHomes With iChurch Slides, 11/7/10
Syncing our iHomes With iChurch Slides, 11/7/10Syncing our iHomes With iChurch Slides, 11/7/10
Syncing our iHomes With iChurch Slides, 11/7/10CLADSM
 
Announcements 2/28/16
Announcements 2/28/16Announcements 2/28/16
Announcements 2/28/16
CLADSM
 
Announcements, 4/27/14
Announcements, 4/27/14Announcements, 4/27/14
Announcements, 4/27/14CLADSM
 
Jesus Still Heals Slides, 7/21/13
Jesus Still Heals Slides, 7/21/13Jesus Still Heals Slides, 7/21/13
Jesus Still Heals Slides, 7/21/13CLADSM
 

Viewers also liked (20)

From The Inside Out Slides, 1/16/11
From The Inside Out Slides, 1/16/11From The Inside Out Slides, 1/16/11
From The Inside Out Slides, 1/16/11
 
ECEC Research in Norway and Scandinavia: Mapping and appraisal of Scandinavia...
ECEC Research in Norway and Scandinavia: Mapping and appraisal of Scandinavia...ECEC Research in Norway and Scandinavia: Mapping and appraisal of Scandinavia...
ECEC Research in Norway and Scandinavia: Mapping and appraisal of Scandinavia...
 
2011년 6월_ 신상품 및 신규 매체 리포트
2011년 6월_ 신상품 및 신규 매체 리포트2011년 6월_ 신상품 및 신규 매체 리포트
2011년 6월_ 신상품 및 신규 매체 리포트
 
Bad construction
Bad constructionBad construction
Bad construction
 
Textos grecs i romans
Textos grecs i romansTextos grecs i romans
Textos grecs i romans
 
Key findings from the 2011 edition of Education at a Glance
Key findings from the 2011 edition of  Education at a GlanceKey findings from the 2011 edition of  Education at a Glance
Key findings from the 2011 edition of Education at a Glance
 
Cogapp open studios - Collaborative Spatial Thinking
Cogapp open studios - Collaborative Spatial ThinkingCogapp open studios - Collaborative Spatial Thinking
Cogapp open studios - Collaborative Spatial Thinking
 
Announcements, 1/16/11
Announcements, 1/16/11Announcements, 1/16/11
Announcements, 1/16/11
 
Chinglish!!three
Chinglish!!threeChinglish!!three
Chinglish!!three
 
Announcements, 3/27/11
Announcements, 3/27/11Announcements, 3/27/11
Announcements, 3/27/11
 
Water babies
Water babiesWater babies
Water babies
 
숙취해소음료 온라인 행태분석
숙취해소음료 온라인 행태분석 숙취해소음료 온라인 행태분석
숙취해소음료 온라인 행태분석
 
Announcements, 5/24/15
Announcements, 5/24/15Announcements, 5/24/15
Announcements, 5/24/15
 
CommUNITY Slides, 2/10/13
CommUNITY Slides, 2/10/13CommUNITY Slides, 2/10/13
CommUNITY Slides, 2/10/13
 
Announcements, 9/20/15
Announcements, 9/20/15Announcements, 9/20/15
Announcements, 9/20/15
 
Ingles2
Ingles2Ingles2
Ingles2
 
Syncing our iHomes With iChurch Slides, 11/7/10
Syncing our iHomes With iChurch Slides, 11/7/10Syncing our iHomes With iChurch Slides, 11/7/10
Syncing our iHomes With iChurch Slides, 11/7/10
 
Announcements 2/28/16
Announcements 2/28/16Announcements 2/28/16
Announcements 2/28/16
 
Announcements, 4/27/14
Announcements, 4/27/14Announcements, 4/27/14
Announcements, 4/27/14
 
Jesus Still Heals Slides, 7/21/13
Jesus Still Heals Slides, 7/21/13Jesus Still Heals Slides, 7/21/13
Jesus Still Heals Slides, 7/21/13
 

Similar to Refactoring

Object Oriented Solved Practice Programs C++ Exams
Object Oriented Solved Practice Programs C++ ExamsObject Oriented Solved Practice Programs C++ Exams
Object Oriented Solved Practice Programs C++ Exams
MuhammadTalha436
 
Java Lab Manual
Java Lab ManualJava Lab Manual
Java Lab Manual
Naveen Sagayaselvaraj
 
Oracle Certified Associate (OCA) Java SE 8 Programmer II (1Z0-809) - Practice...
Oracle Certified Associate (OCA) Java SE 8 Programmer II (1Z0-809) - Practice...Oracle Certified Associate (OCA) Java SE 8 Programmer II (1Z0-809) - Practice...
Oracle Certified Associate (OCA) Java SE 8 Programmer II (1Z0-809) - Practice...
Udayan Khattry
 
Java programming lab manual
Java programming lab manualJava programming lab manual
Java programming lab manual
sameer farooq
 
J unit presentation
J unit presentationJ unit presentation
J unit presentationPriya Sharma
 
JUnit Presentation
JUnit PresentationJUnit Presentation
JUnit Presentation
priya_trivedi
 
Desing pattern prototype-Factory Method, Prototype and Builder
Desing pattern prototype-Factory Method, Prototype and Builder Desing pattern prototype-Factory Method, Prototype and Builder
Desing pattern prototype-Factory Method, Prototype and Builder
paramisoft
 
Faculty of ScienceDepartment of ComputingFinal Examinati.docx
Faculty of ScienceDepartment of ComputingFinal Examinati.docxFaculty of ScienceDepartment of ComputingFinal Examinati.docx
Faculty of ScienceDepartment of ComputingFinal Examinati.docx
mydrynan
 
TDD And Refactoring
TDD And RefactoringTDD And Refactoring
TDD And Refactoring
Naresh Jain
 
TDD CrashCourse Part3: TDD Techniques
TDD CrashCourse Part3: TDD TechniquesTDD CrashCourse Part3: TDD Techniques
TDD CrashCourse Part3: TDD Techniques
David Rodenas
 
00_Introduction to Java.ppt
00_Introduction to Java.ppt00_Introduction to Java.ppt
00_Introduction to Java.ppt
HongAnhNguyn285885
 
COMM 166 Final Research Proposal GuidelinesThe proposal should.docx
COMM 166 Final Research Proposal GuidelinesThe proposal should.docxCOMM 166 Final Research Proposal GuidelinesThe proposal should.docx
COMM 166 Final Research Proposal GuidelinesThe proposal should.docx
monicafrancis71118
 
COMM 166 Final Research Proposal GuidelinesThe proposal should.docx
COMM 166 Final Research Proposal GuidelinesThe proposal should.docxCOMM 166 Final Research Proposal GuidelinesThe proposal should.docx
COMM 166 Final Research Proposal GuidelinesThe proposal should.docx
cargillfilberto
 
COMM 166 Final Research Proposal GuidelinesThe proposal should.docx
COMM 166 Final Research Proposal GuidelinesThe proposal should.docxCOMM 166 Final Research Proposal GuidelinesThe proposal should.docx
COMM 166 Final Research Proposal GuidelinesThe proposal should.docx
drandy1
 
Graphics, Threads and HTTPConnections in MIDLets
Graphics, Threads and HTTPConnections in MIDLetsGraphics, Threads and HTTPConnections in MIDLets
Graphics, Threads and HTTPConnections in MIDLetsJussi Pohjolainen
 
Suggestion- Use Netbeans to copy your last lab (Lab 07) to a new proje.pdf
Suggestion- Use Netbeans to copy your last lab (Lab 07) to a new proje.pdfSuggestion- Use Netbeans to copy your last lab (Lab 07) to a new proje.pdf
Suggestion- Use Netbeans to copy your last lab (Lab 07) to a new proje.pdf
ssuser58be4b1
 
Methods in Java
Methods in JavaMethods in Java
Methods in Java
Kavitha713564
 
Use Netbeans to copy your last lab (Lab 07) to a new project called La.pdf
Use Netbeans to copy your last lab (Lab 07) to a new project called La.pdfUse Netbeans to copy your last lab (Lab 07) to a new project called La.pdf
Use Netbeans to copy your last lab (Lab 07) to a new project called La.pdf
ashishgargjaipuri
 
The Ring programming language version 1.5.1 book - Part 25 of 180
The Ring programming language version 1.5.1 book - Part 25 of 180The Ring programming language version 1.5.1 book - Part 25 of 180
The Ring programming language version 1.5.1 book - Part 25 of 180
Mahmoud Samir Fayed
 

Similar to Refactoring (20)

Object Oriented Solved Practice Programs C++ Exams
Object Oriented Solved Practice Programs C++ ExamsObject Oriented Solved Practice Programs C++ Exams
Object Oriented Solved Practice Programs C++ Exams
 
Java Lab Manual
Java Lab ManualJava Lab Manual
Java Lab Manual
 
JavaProgrammingManual
JavaProgrammingManualJavaProgrammingManual
JavaProgrammingManual
 
Oracle Certified Associate (OCA) Java SE 8 Programmer II (1Z0-809) - Practice...
Oracle Certified Associate (OCA) Java SE 8 Programmer II (1Z0-809) - Practice...Oracle Certified Associate (OCA) Java SE 8 Programmer II (1Z0-809) - Practice...
Oracle Certified Associate (OCA) Java SE 8 Programmer II (1Z0-809) - Practice...
 
Java programming lab manual
Java programming lab manualJava programming lab manual
Java programming lab manual
 
J unit presentation
J unit presentationJ unit presentation
J unit presentation
 
JUnit Presentation
JUnit PresentationJUnit Presentation
JUnit Presentation
 
Desing pattern prototype-Factory Method, Prototype and Builder
Desing pattern prototype-Factory Method, Prototype and Builder Desing pattern prototype-Factory Method, Prototype and Builder
Desing pattern prototype-Factory Method, Prototype and Builder
 
Faculty of ScienceDepartment of ComputingFinal Examinati.docx
Faculty of ScienceDepartment of ComputingFinal Examinati.docxFaculty of ScienceDepartment of ComputingFinal Examinati.docx
Faculty of ScienceDepartment of ComputingFinal Examinati.docx
 
TDD And Refactoring
TDD And RefactoringTDD And Refactoring
TDD And Refactoring
 
TDD CrashCourse Part3: TDD Techniques
TDD CrashCourse Part3: TDD TechniquesTDD CrashCourse Part3: TDD Techniques
TDD CrashCourse Part3: TDD Techniques
 
00_Introduction to Java.ppt
00_Introduction to Java.ppt00_Introduction to Java.ppt
00_Introduction to Java.ppt
 
COMM 166 Final Research Proposal GuidelinesThe proposal should.docx
COMM 166 Final Research Proposal GuidelinesThe proposal should.docxCOMM 166 Final Research Proposal GuidelinesThe proposal should.docx
COMM 166 Final Research Proposal GuidelinesThe proposal should.docx
 
COMM 166 Final Research Proposal GuidelinesThe proposal should.docx
COMM 166 Final Research Proposal GuidelinesThe proposal should.docxCOMM 166 Final Research Proposal GuidelinesThe proposal should.docx
COMM 166 Final Research Proposal GuidelinesThe proposal should.docx
 
COMM 166 Final Research Proposal GuidelinesThe proposal should.docx
COMM 166 Final Research Proposal GuidelinesThe proposal should.docxCOMM 166 Final Research Proposal GuidelinesThe proposal should.docx
COMM 166 Final Research Proposal GuidelinesThe proposal should.docx
 
Graphics, Threads and HTTPConnections in MIDLets
Graphics, Threads and HTTPConnections in MIDLetsGraphics, Threads and HTTPConnections in MIDLets
Graphics, Threads and HTTPConnections in MIDLets
 
Suggestion- Use Netbeans to copy your last lab (Lab 07) to a new proje.pdf
Suggestion- Use Netbeans to copy your last lab (Lab 07) to a new proje.pdfSuggestion- Use Netbeans to copy your last lab (Lab 07) to a new proje.pdf
Suggestion- Use Netbeans to copy your last lab (Lab 07) to a new proje.pdf
 
Methods in Java
Methods in JavaMethods in Java
Methods in Java
 
Use Netbeans to copy your last lab (Lab 07) to a new project called La.pdf
Use Netbeans to copy your last lab (Lab 07) to a new project called La.pdfUse Netbeans to copy your last lab (Lab 07) to a new project called La.pdf
Use Netbeans to copy your last lab (Lab 07) to a new project called La.pdf
 
The Ring programming language version 1.5.1 book - Part 25 of 180
The Ring programming language version 1.5.1 book - Part 25 of 180The Ring programming language version 1.5.1 book - Part 25 of 180
The Ring programming language version 1.5.1 book - Part 25 of 180
 

Recently uploaded

DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
DianaGray10
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Jeffrey Haguewood
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
RTTS
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Product School
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
g2nightmarescribd
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
Elena Simperl
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
Product School
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
Product School
 

Recently uploaded (20)

DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 

Refactoring

  • 1. Refactoring: A Brief Introduction
  • 2.
  • 3. An Example with NUnit #region Using using NUnit.Framework; #endregion namespace com.sds.prime { [TestFixture] public class PrimeTest { [Test] public void testMethod() { Prime prime = new Prime(); } } }
  • 4.
  • 5. Run Test with NUnit plugin
  • 6.
  • 7. An Example with NUnit #region Using using NUnit.Framework; #endregion namespace com.sds.prime { [TestFixture] public class PrimeTest { [Test] public void testMethod() { Prime prime = new Prime(); Assert.IsTrue(prime.getNext(1) == 1); } } }
  • 8.
  • 9. Run Test with NUnit plugin
  • 10.
  • 11. An Example with NUnit #region Using using NUnit.Framework; #endregion namespace com.sds.prime { [TestFixture] public class PrimeTest { [Test] public void testMethod() { Prime prime = new Prime(); Assert.IsTrue(prime.getNext(1) == 1); Assert.IsTrue(prime.getNext(2) == 2); } } }
  • 12.
  • 13. Run Test with NUnit plugin
  • 14.
  • 15. An Example with NUnit #region Using using NUnit.Framework; #endregion namespace com.sds.prime { [TestFixture] public class PrimeTest { [Test] public void testMethod() { Prime prime = new Prime(); Assert.IsTrue(prime.getNext(1) == 1); Assert.IsTrue(prime.getNext(2) == 2); Assert.IsTrue(prime.getNext(10) == 23); } } }
  • 16.
  • 17.
  • 18. Run Test with NUnit plugin
  • 19.
  • 20.
  • 21.
  • 22. Run Test with NUnit plugin
  • 23.
  • 24.
  • 25.
  • 26.
  • 27.
  • 28.
  • 29.
  • 30.
  • 31.
  • 32.
  • 33.
  • 34.
  • 35.
  • 36.
  • 37.
  • 38.
  • 39.