public void ShouldCreateFieldByNameAndId(string name, ID id) { var sut = new UnversionedDbField(name, id); sut.Name.Should().Be(name); sut.ID.Should().BeSameAs(id); }
public void ShouldSetValuePerLanguage([NoAutoProperties] UnversionedDbField sut, string value1, string value2) { sut.SetValue("en", value1); sut.SetValue("dk", value2); sut.GetValue("en", 0).Should().Be(value1); sut.GetValue("dk", 0).Should().Be(value2); }
public void ShouldRetunLastValueAddedPerLanguage([NoAutoProperties] UnversionedDbField sut, string value1, string expected) { sut.Add("en", value1); sut.Add("en", expected); sut.GetValue("en", 1).Should().Be(expected); sut.GetValue("en", 2).Should().Be(expected); }
public void ShouldRetunEmptyValueForLanguage([NoAutoProperties] UnversionedDbField sut) { sut.GetValue("en", 1).Should().BeEmpty(); }
public void AddThrowsIfLanguageIsNull([NoAutoProperties] UnversionedDbField sut) { Action action = () => sut.Add(null, null); action.ShouldThrow <ArgumentNullException>().WithMessage("*language"); }
public void ShouldCreateFieldById(ID id) { var sut = new UnversionedDbField(id); sut.ID.Should().BeSameAs(id); }
public void ShouldCreateFieldByName(string name) { var sut = new UnversionedDbField(name); sut.Name.Should().Be(name); }
public void ShouldBeDbField(UnversionedDbField sut) { sut.Should().BeAssignableTo <DbField>(); }
public void ShouldBeDbField(UnversionedDbField sut) { sut.Should().BeAssignableTo<DbField>(); }