public void LoadArmTemplate_MinimalFile_Returns_ExpectedArmTemplate() { // Arrange var filePath = @"c:\templates\main\minimal.arm.template.json"; var expectedArmTemplate = new ArmTemplate(filePath, JObject.Parse(fileSystem.File.ReadAllText(filePath))); // Act var arm = sut.LoadArmTemplate(filePath); // Assert arm.Should().BeEquivalentTo(expectedArmTemplate); }
public void SaveExpandedTemplate_Should_Be_As_Expected_Template() { // Arrange var filePath = @"c:\templates\main\arm.template.with.templateLink.json"; var arm = sut.LoadArmTemplate(filePath); sut.ExpandArmTemplate(arm); // Act var storedFileName = sut.SaveExpandedTemplate(arm); // Assert JObject contentInExpandedFile = JObject.Parse(fileSystem.File.ReadAllText(storedFileName)); JObject expectedContent = JObject.Parse(fileSystem.File.ReadAllText(@"c:\templates\main\arm.expected.extended.template.json")); contentInExpandedFile.Should().BeEquivalentTo(expectedContent); }
public void ExpandArmTemplate_Sets_IsExpanded_To_True() { // Arrange var filePath = @"c:\templates\main\arm.template.with.templateLink.json"; var arm = sut.LoadArmTemplate(filePath); // Act sut.ExpandArmTemplate(arm); // Assert arm.IsExpanded.Should().Be(true); }