public void Should_use_same_config_and__not_equal() { //Arrange var config = new SampleBuilderConfiguration() { AlwaysUseDateTimeAs = DateTime.Now }; //Act var p1 = SampleBuilder.Create <SampleDataClassForEquality>(config); var p2 = SampleBuilder.Create <SampleDataClassForEquality>(p => p.IntValue = -1, config); //Assert p1.Should().NotBe(p2); }
public void Should_dictionary_initialized() { var config = new SampleBuilderConfiguration() { CollectionCount = 2 }; //Act var p1 = SampleBuilder.Create <SampleDataWithDictionary>(config); //Assert p1.DictionaryProperty.Should().NotBeNull(); //p1.DictionaryProperty.Should().HaveCount(config.CollectionCount); //p1.DictionaryProperty.Keys.First().Should().Be(0); //p1.DictionaryProperty.Keys.Last().Should().Be(1); }