public GetAzureResourceCommandTests()
 {
     resourcesClientMock = new Mock<ResourcesClient>();
     commandRuntimeMock = new Mock<ICommandRuntime>();
     cmdlet = new GetAzureResourceCommand()
     {
         CommandRuntime = commandRuntimeMock.Object,
         ResourcesClient = resourcesClientMock.Object
     };
     properties = new Dictionary<string, object>
         {
             {"name", "site1"},
             {"siteMode", "Standard"},
             {"computeMode", "Dedicated"},
             {"misc", new Dictionary<string, object>
                 {
                     {"key1", "value1"},
                     {"key2", "value2"}
                 }}
         };
     serializedProperties = JsonConvert.SerializeObject(properties, new JsonSerializerSettings
     {
         TypeNameAssemblyFormat = FormatterAssemblyStyle.Simple,
         TypeNameHandling = TypeNameHandling.None
     });
 }
Exemplo n.º 2
0
 public GetAzureResourceCommandTests()
 {
     resourcesClientMock = new Mock <ResourcesClient>();
     commandRuntimeMock  = new Mock <ICommandRuntime>();
     cmdlet = new GetAzureResourceCommand()
     {
         CommandRuntime  = commandRuntimeMock.Object,
         ResourcesClient = resourcesClientMock.Object
     };
     properties = new Dictionary <string, object>
     {
         { "name", "site1" },
         { "siteMode", "Standard" },
         { "computeMode", "Dedicated" },
         { "misc", new Dictionary <string, object>
           {
               { "key1", "value1" },
               { "key2", "value2" }
           } }
     };
     serializedProperties = JsonConvert.SerializeObject(properties, new JsonSerializerSettings
     {
         TypeNameAssemblyFormat = FormatterAssemblyStyle.Simple,
         TypeNameHandling       = TypeNameHandling.None
     });
 }