Skip to content

Abhishek-add/api-test2

 
 

Repository files navigation

Hello, This is Abhishek B.

Asp.net Core 2 API Development (REST API) Demo


What is about the Repository & Library?

This is a Asp.net Core 2 API Rest Service Application that is a demo with Person and its Identifier details.


@Libraries

  • Core2APIExercise ( Root API Application )
  • Core2APIExercise.Common ( Initializer, Respositories etc )
  • Core2APIExercise.Data ( Db Context, Entities etc)
  • Core2APIExercise.UnitTest ( Repo XUnit Testing Lib )
  • Core2APIExercise.BaseTest ( Base Test Class ... )

Quick reference

About

This demo application is an exercise to demonstrate, How to write the Rest API with Repositort and UnitOfWork Pattern, This repository contains a xUnit Test cases to show the Integration and Automatic Testing, This is a great at demonstrating concepts,
The purpose of this demo application is to apply concepts/techniques exercise to Large scale API/Web application.


#Testing

  • Unit Testing using Moq and xUnit
  • Integration Testing using TestHost and
  • InMemoryDatabase
  • UI Testing using Selenium

#Technologies

  • ASP.NET Core 2.0
  • Entity Framework Core 2.0 / Identity 2.0
  • xUnit
  • Moq
  • Swash Buckle ( Use friendly API route & TEST )
  • AutoMapper ( Mapping user model to Db Entities)

#Design Patterns

  • Repository
  • Unit Of Work

#POSTMAN Test METHODS

image


#Unit Test - ScreenShot image

What covers in Core2 API

  • Get all the persons with identfiers.
  • get all the person by firstname or lastname
  • get all the person who has specific identifiers
  • create a person with idetifiers
  • create a person without identifiers
  • add new identifier to a person,
  • delete identifier form a person
  • execute a logical delete on a person
  • update a person without changing identifiers

Extra points Covers in this Demo

  • adding using xunit test cases for the controllers
  • using fluentValidation instead of data attributes
  • using migrations on ef core
  • adding support to swagger
  • rest url structure

changelog

  • 04-Nov-2017

thanks

Email: bhalaniabhishek[@]Gmail[dot]com

Releases

No releases published

Packages

No packages published

Languages

  • C# 98.9%
  • Other 1.1%