Skip to content

A sample project to spike TestServer for Integration Test .Net core WebAPI

Notifications You must be signed in to change notification settings

Dileep17/PetStoreAPI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PetStoreAPI

A sample project to spike TestServer for Integration Test .Net core WebAPI.

a. Tests in TestsWithDB folder use same config as specified for PetStoreAPI project

b. Tests in InMemoryTest folder in memory DB

c. Tests in MockTests folder use same config as specified for PetStoreAPI project and uses Stubbery library to mock external service calls

Steps to run tests

  1. Install Postgres DB and create "PetStore" Database

  2. Create Tables as below

     CREATE TABLE public."Pets"
     (
       "Id" integer NOT NULL DEFAULT nextval('"Pets_id_seq"'::regclass),
       "Name" character varying,
       "Family" character varying,
       CONSTRAINT "Pets_pkey" PRIMARY KEY ("Id")
     )
     WITH (
       OIDS=FALSE
     );
    
     CREATE TABLE public."Owners"
     (
       "Id" integer NOT NULL DEFAULT nextval('"Owners_id_seq"'::regclass),
       "Name" character varying,
       CONSTRAINT "Owners_pkey" PRIMARY KEY ("Id")
     )
     WITH (
       OIDS=FALSE
     );
    
  3. Build and Run Nunit Tests in IntegrationTests project

About

A sample project to spike TestServer for Integration Test .Net core WebAPI

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages