舉報

會員
C# and .NET Core Test Driven Development
Thisbookisfor.NETdeveloperswhowouldliketobuildefficientapplicationsbyimplementingprinciplesoftest-drivendevelopment.C#programmingandworkingknowledgeofVSisassumed.
最新章節
- Leave a review - let other readers know what you think
- Other Books You May Enjoy
- Summary
- Creating a NuGet package
- dotnet publish command
- Packaging for NuGet distribution
品牌:中圖公司
上架時間:2021-06-25 21:01:49
出版社:Packt Publishing
本書數字版權由中圖公司提供,并由其授權上海閱文信息技術有限公司制作發行
- Leave a review - let other readers know what you think 更新時間:2021-06-25 22:01:09
- Other Books You May Enjoy
- Summary
- Creating a NuGet package
- dotnet publish command
- Packaging for NuGet distribution
- Microsoft.AspNetCore.All metapackage
- Metapackage
- .NET Core packages and metapackages
- Semantic Versioning
- Docker
- Package manager
- Installer
- Versioning principle
- .NET Core versioning
- Executing xUnit.net tests in .NET Core projects
- Executing xUnit.net tests in .NET projects
- Executing xUnit.net tests with Cake
- Testing and Packaging the Application
- Summary
- Adding a build task
- Installing Cake into VSTS
- Setting up a project in VSTS
- CI with Visual Studio Team Services
- Using Cake tasks to build steps
- Syntax highlighting
- Task Runner Explorer
- Cake templates
- Cake Extension for Visual Studio
- LoanApplication build script
- Cake's error handling and finally block
- Criteria
- Dependencies
- Configuration and preprocessor directives
- TaskSetup and TaskTeardown
- Task
- Writing build scripts in C#
- Step 3
- Step 2
- Step 1
- Cake Bootstrapper installation steps
- PowerShell security
- Installation
- Installing the Cake Bootstrapper
- Creating Continuous Integration Build Processes
- Summary
- Configuring and running build
- TeamCity CI workflow
- Installing TeamCity Server
- TeamCity concepts
- TeamCity CI platform
- Setting up your first WebHook
- Events and payloads
- GitHub WebHook
- Consuming WebHooks
- Configuring GitHub WebHooks
- Branching and merging commands
- Change commands
- Initializing repository commands
- Configuration commands
- Basic Git commands
- Reviewing changes and merging
- Pull request
- Branching with GitHub Flow
- Project hosting
- GitHub online project hosting
- Reduced costs
- Quality software products
- Lower risks
- Benefits of continuous delivery
- Continuous delivery
- Jenkins
- TeamCity
- Microsoft Team Foundation Server
- CI tools
- Facilitating continuous delivery
- Reduced risks
- Improved productivity
- Quick bugs detection
- Benefits of CI
- Daily commit
- Identical test and production environments
- Automated tests
- Build automation
- Single source code repository
- CI workflow
- Continuous integration
- Continuous Integration and Project Hosting
- Summary
- Mocking internal types
- Advanced Moq features
- LINQ to mocks
- Verification method and property invocations with Moq
- Implementing multiple interfaces in a mock
- Mock repository
- CallBase
- Mock customization
- Callbacks
- Events
- Matching parameters
- Properties
- Mocking methods properties and callback
- Mocking objects using Moq framework
- Hand-rolled mock
- Mocks and stubs
- Benefits of hand-rolling mocks
- Mocking concept
- Hand-rolling mocks versus using a mocking framework
- Mock explosion
- Extra complexity
- Interface explosion
- The shortcomings of mocking frameworks
- Wider test coverage
- Refactoring legacy code
- Dependencies isolation
- Fast running tests
- The benefits of mocking objects
- Mocking Dependencies
- Summary
- Custom attribute
- SqlServerData attribute
- Integrating data from other sources
- ClassData attribute
- MemberData attribute
- Property data-driven unit tests
- Inline data-driven unit tests
- xUnit.net theory attribute for creating data-driven tests
- Inclusive testing
- Tests brevity
- The benefits of data-driven unit testing
- Data-Driven Unit Tests
- Summary
- ReSharper
- The test runners available on both .NET Core and Windows
- Proving unit test results with xUnit.net assertions
- Live unit testing with Visual Studio 2017 Enterprise
- xUnit.net shared test context
- Structuring unit tests with xUnit
- Unit testing razor pages
- Unit testing controllers
- Unit testing consideration for ASP.NET MVC Core
- Test parallelism
- xUnit.net test runners
- How to configure xUnit.net
- xUnit.net
- .NET Core testing with NUnit
- .NET Core testing with MSTest
- Unit testing framework ecosystem for .NET Core and C#
- Easy to set up non-trivial and with good coverage
- Maintainable and runs fast
- Repeatable
- Unit independence
- Readable
- The attributes of a good unit test
- .NET Core Unit Testing
- Summary
- Setting up a DI container for ASP.NET Core MVC
- Dependency Inversion Principle
- Interface Segregation Principle
- Liskov Substitution Principle
- Open-Closed Principle
- Single Responsibility Principle
- The SOLID architecture principles
- Train Wreck
- Law of Demeter
- Static objects
- Classes with more than one responsibility
- Monster Constructor
- Tight coupling
- Warning signs when writing untestable code
- Writing Testable Code
- Summary
- Creating an ASP.NET MVC Core application
- Digit separator and binary literal
- Patterns matching
- Local function
- Ref returns
- Ref locals
- Ref locals and returns
- Out keyword
- Tuples enhancement
- A look at the new features of C# 7
- Exploring Visual Studio Code
- Installing and setting up Visual Studio Code on Linux
- Installing .NET Core on Linux
- Tour of Microsoft's Visual Studio Code editor
- Startup.cs
- Program.cs
- JSON files – bower.json appsettings.json bundleconfig.json
- Models Views and Controllers folders
- wwwroot folder
- ASP.NET Core MVC project structure
- Structure of a .NET Core application
- Limitations of .NET Core
- Scalability and performance
- Ease of deployment
- Cross-platform requirements
- When to choose .NET Core over .NET Framework
- Supported languages
- .NET Core components
- .NET Standard
- .NET Core framework
- Getting Started with .NET Core
- Summary
- The TDD cycle
- Doing TDD the wrong way
- Refactoring
- Running the tests
- Writing the code
- Writing the tests
- Principles of TDD
- User acceptance testing
- System testing
- Integration tests
- Unit tests
- Types of tests
- Benefits of TDD
- TDD misconceptions
- Origin of TDD
- The principles of test-driven development
- Building for longevity
- Why test-driven development?
- Succinct and proper documentation
- C# coding conventions
- Preventing and detecting code smell
- Sound architecture and design
- Loose coupling
- What we can do to prevent bad code
- Non-tested code
- Poor source code documentation
- Source code readability
- Naming the program elements
- Bad or broken designs
- Code smell
- Tight coupling
- How does bad code appear?
- Difficulty in maintaining code
- Exploring Test-Driven Development
- Reviews
- Get in touch
- Conventions used
- Download the color images
- Download the example code files
- To get the most out of this book
- What this book covers
- Who this book is for
- Preface
- Packt is searching for authors like you
- About the reviewer
- About the author
- Contributors
- PacktPub.com
- Why subscribe?
- Packt Upsell
- Dedication
- 版權信息
- 封面
- 封面
- 版權信息
- Dedication
- Packt Upsell
- Why subscribe?
- PacktPub.com
- Contributors
- About the author
- About the reviewer
- Packt is searching for authors like you
- Preface
- Who this book is for
- What this book covers
- To get the most out of this book
- Download the example code files
- Download the color images
- Conventions used
- Get in touch
- Reviews
- Exploring Test-Driven Development
- Difficulty in maintaining code
- How does bad code appear?
- Tight coupling
- Code smell
- Bad or broken designs
- Naming the program elements
- Source code readability
- Poor source code documentation
- Non-tested code
- What we can do to prevent bad code
- Loose coupling
- Sound architecture and design
- Preventing and detecting code smell
- C# coding conventions
- Succinct and proper documentation
- Why test-driven development?
- Building for longevity
- The principles of test-driven development
- Origin of TDD
- TDD misconceptions
- Benefits of TDD
- Types of tests
- Unit tests
- Integration tests
- System testing
- User acceptance testing
- Principles of TDD
- Writing the tests
- Writing the code
- Running the tests
- Refactoring
- Doing TDD the wrong way
- The TDD cycle
- Summary
- Getting Started with .NET Core
- .NET Core framework
- .NET Standard
- .NET Core components
- Supported languages
- When to choose .NET Core over .NET Framework
- Cross-platform requirements
- Ease of deployment
- Scalability and performance
- Limitations of .NET Core
- Structure of a .NET Core application
- ASP.NET Core MVC project structure
- wwwroot folder
- Models Views and Controllers folders
- JSON files – bower.json appsettings.json bundleconfig.json
- Program.cs
- Startup.cs
- Tour of Microsoft's Visual Studio Code editor
- Installing .NET Core on Linux
- Installing and setting up Visual Studio Code on Linux
- Exploring Visual Studio Code
- A look at the new features of C# 7
- Tuples enhancement
- Out keyword
- Ref locals and returns
- Ref locals
- Ref returns
- Local function
- Patterns matching
- Digit separator and binary literal
- Creating an ASP.NET MVC Core application
- Summary
- Writing Testable Code
- Warning signs when writing untestable code
- Tight coupling
- Monster Constructor
- Classes with more than one responsibility
- Static objects
- Law of Demeter
- Train Wreck
- The SOLID architecture principles
- Single Responsibility Principle
- Open-Closed Principle
- Liskov Substitution Principle
- Interface Segregation Principle
- Dependency Inversion Principle
- Setting up a DI container for ASP.NET Core MVC
- Summary
- .NET Core Unit Testing
- The attributes of a good unit test
- Readable
- Unit independence
- Repeatable
- Maintainable and runs fast
- Easy to set up non-trivial and with good coverage
- Unit testing framework ecosystem for .NET Core and C#
- .NET Core testing with MSTest
- .NET Core testing with NUnit
- xUnit.net
- How to configure xUnit.net
- xUnit.net test runners
- Test parallelism
- Unit testing consideration for ASP.NET MVC Core
- Unit testing controllers
- Unit testing razor pages
- Structuring unit tests with xUnit
- xUnit.net shared test context
- Live unit testing with Visual Studio 2017 Enterprise
- Proving unit test results with xUnit.net assertions
- The test runners available on both .NET Core and Windows
- ReSharper
- Summary
- Data-Driven Unit Tests
- The benefits of data-driven unit testing
- Tests brevity
- Inclusive testing
- xUnit.net theory attribute for creating data-driven tests
- Inline data-driven unit tests
- Property data-driven unit tests
- MemberData attribute
- ClassData attribute
- Integrating data from other sources
- SqlServerData attribute
- Custom attribute
- Summary
- Mocking Dependencies
- The benefits of mocking objects
- Fast running tests
- Dependencies isolation
- Refactoring legacy code
- Wider test coverage
- The shortcomings of mocking frameworks
- Interface explosion
- Extra complexity
- Mock explosion
- Hand-rolling mocks versus using a mocking framework
- Mocking concept
- Benefits of hand-rolling mocks
- Mocks and stubs
- Hand-rolled mock
- Mocking objects using Moq framework
- Mocking methods properties and callback
- Properties
- Matching parameters
- Events
- Callbacks
- Mock customization
- CallBase
- Mock repository
- Implementing multiple interfaces in a mock
- Verification method and property invocations with Moq
- LINQ to mocks
- Advanced Moq features
- Mocking internal types
- Summary
- Continuous Integration and Project Hosting
- Continuous integration
- CI workflow
- Single source code repository
- Build automation
- Automated tests
- Identical test and production environments
- Daily commit
- Benefits of CI
- Quick bugs detection
- Improved productivity
- Reduced risks
- Facilitating continuous delivery
- CI tools
- Microsoft Team Foundation Server
- TeamCity
- Jenkins
- Continuous delivery
- Benefits of continuous delivery
- Lower risks
- Quality software products
- Reduced costs
- GitHub online project hosting
- Project hosting
- Branching with GitHub Flow
- Pull request
- Reviewing changes and merging
- Basic Git commands
- Configuration commands
- Initializing repository commands
- Change commands
- Branching and merging commands
- Configuring GitHub WebHooks
- Consuming WebHooks
- GitHub WebHook
- Events and payloads
- Setting up your first WebHook
- TeamCity CI platform
- TeamCity concepts
- Installing TeamCity Server
- TeamCity CI workflow
- Configuring and running build
- Summary
- Creating Continuous Integration Build Processes
- Installing the Cake Bootstrapper
- Installation
- PowerShell security
- Cake Bootstrapper installation steps
- Step 1
- Step 2
- Step 3
- Writing build scripts in C#
- Task
- TaskSetup and TaskTeardown
- Configuration and preprocessor directives
- Dependencies
- Criteria
- Cake's error handling and finally block
- LoanApplication build script
- Cake Extension for Visual Studio
- Cake templates
- Task Runner Explorer
- Syntax highlighting
- Using Cake tasks to build steps
- CI with Visual Studio Team Services
- Setting up a project in VSTS
- Installing Cake into VSTS
- Adding a build task
- Summary
- Testing and Packaging the Application
- Executing xUnit.net tests with Cake
- Executing xUnit.net tests in .NET projects
- Executing xUnit.net tests in .NET Core projects
- .NET Core versioning
- Versioning principle
- Installer
- Package manager
- Docker
- Semantic Versioning
- .NET Core packages and metapackages
- Metapackage
- Microsoft.AspNetCore.All metapackage
- Packaging for NuGet distribution
- dotnet publish command
- Creating a NuGet package
- Summary
- Other Books You May Enjoy
- Leave a review - let other readers know what you think 更新時間:2021-06-25 22:01:09