public void to_string_with_host_name() { var value = PropertyValue.For <OneDirective>(x => x.Age, 23); value.HostName = "Host1"; value.ToString().ShouldEqual("Host1.OneDirective.Age=23"); }
public void write_complex_property_value() { var value = PropertyValue.For <ComplexSettings>(x => x.Simple.One, "one"); theWriter.WritePropertyValue(value); theWriter.AllLines().ShouldHaveTheSameElementsAs("ComplexSettings.Simple.One=one"); }
public void write_with_accessor_and_no_host() { var value = PropertyValue.For <OneDirective>(x => x.Age, 23); var writer = MockRepository.GenerateMock <IFlatFileWriter>(); value.Write(writer); writer.AssertWasCalled(x => x.WriteProperty("OneDirective.Age", "23")); }
public void write_with_host_name() { var value = PropertyValue.For <OneDirective>(x => x.Age, 23); value.HostName = "Host1"; var writer = MockRepository.GenerateMock <IFlatFileWriter>(); value.Write(writer); writer.AssertWasCalled(x => x.WriteProperty("Host1.OneDirective.Age", "23")); }
public void to_string_with_accessor_and_no_host() { var value = PropertyValue.For <OneDirective>(x => x.Age, 23); value.ToString().ShouldEqual("OneDirective.Age=23"); }