All files / src/test-routes/dpg customization.ts

0% Statements 0/22
0% Branches 0/4
0% Functions 0/10
0% Lines 0/22

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66                                                                                                                                   
import { app, json } from "../../api";
 
app.category("dpg", () => {
  app.get("/customization/model/raw", "GetRawModel", (req) => {
    return {
      status: 200,
      body: json({ received: "raw" }),
    };
  });
  app.get("/customization/model/model", "GetHandwrittenModel", (req) => {
    return {
      status: 200,
      body: json({ received: "model" }),
    };
  });
  app.post("/customization/model/raw", "PostRawModel", (req) => {
    req.expect.bodyEquals({ hello: `world!` });
    return {
      status: 200,
      body: json({ received: "raw" }),
    };
  });
  app.post("/customization/model/model", "PostHandwrittenModel", (req) => {
    req.expect.bodyEquals({ hello: `world!` });
    return {
      status: 200,
      body: json({ received: "model" }),
    };
  });
 
  app.get("/customization/paging/:mode/", "", (req) => {
    return {
      status: 200,
      body: json({
        values: [{ received: req.params.mode?.toString() }],
        nextLink: req.baseUrl + "/customization/paging/" + req.params.mode + "/2",
      }),
    };
  });
  app.get("/customization/paging/raw/2", "GetRawPages", (req) => {
    return {
      status: 200,
      body: json({ values: [{ received: "raw" }] }),
    };
  });
  app.get("/customization/paging/model/2", "GetHandwrittenModelPages", (req) => {
    return {
      status: 200,
      body: json({ values: [{ received: "model" }] }),
    };
  });
 
  app.put("/customization/lro/raw", "RawLRO", (req) => {
    return {
      status: 200,
      body: json({ provisioningState: "Succeeded", received: "raw" }),
    };
  });
  app.put("/customization/lro/model", "HandwrittenModelLRO", (req) => {
    return {
      status: 200,
      body: json({ provisioningState: "Succeeded", received: "model" }),
    };
  });
});