Esempio n. 1
0
        public static void Impersonate <T>(
            this MountebankClient theClient,
            string mockFriendlyName,
            string path,
            int port,
            MbDotNet.Enums.Method httpMethod,
            HttpStatusCode returnCode,
            T returnBody)
        {
            HttpImposter imposter = theClient.CreateOrReplaceHttpImposter(port, mockFriendlyName);

            imposter.AddStub()
            .OnPathAndMethodEqual(path, httpMethod)
            .ReturnsJson(returnCode, returnBody);
            theClient.Submit(imposter);
        }