Exemplo n.º 1
0
        public void WriteBasicInfoToJson()
        {
            // Arrange
            string expect = @"
{
  ""title"": ""Sample OData Book Store App"",
  ""description"": ""This is a sample OData server for a book store."",
  ""termsOfService"": ""http://services.odata.org/"",
  ""version"": ""1.0.1""
}".Replace();

            // Act & Assert
            Assert.Equal(expect, BasicInfo.WriteToJson());
        }
Exemplo n.º 2
0
        public void WriteAdvanceInfoToJson()
        {
            // Arrange
            string expect = @"
{
  ""title"": ""Sample Pet Store App"",
  ""description"": ""This is a sample server for a pet store."",
  ""termsOfService"": ""http://example.com/terms/"",
  ""contact"": {
    ""name"": ""API Support"",
    ""url"": ""http://www.example.com/support"",
    ""email"": ""*****@*****.**""
  },
  ""license"": {
    ""name"": ""Apache 2.0"",
    ""url"": ""http://www.apache.org/licenses/LICENSE-2.0.html""
  },
  ""version"": ""1.0.1""
}".Replace();

            // Act & Assert
            Assert.Equal(expect, AdvanceInfo.WriteToJson());
        }