Пример #1
0
        public void ShouldCreateFieldByNameAndId(string name, ID id)
        {
            var sut = new UnversionedDbField(name, id);

            sut.Name.Should().Be(name);
            sut.ID.Should().BeSameAs(id);
        }
Пример #2
0
        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);
        }
Пример #3
0
        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);
        }
Пример #4
0
 public void ShouldRetunEmptyValueForLanguage([NoAutoProperties] UnversionedDbField sut)
 {
     sut.GetValue("en", 1).Should().BeEmpty();
 }
Пример #5
0
        public void AddThrowsIfLanguageIsNull([NoAutoProperties] UnversionedDbField sut)
        {
            Action action = () => sut.Add(null, null);

            action.ShouldThrow <ArgumentNullException>().WithMessage("*language");
        }
Пример #6
0
        public void ShouldCreateFieldById(ID id)
        {
            var sut = new UnversionedDbField(id);

            sut.ID.Should().BeSameAs(id);
        }
Пример #7
0
        public void ShouldCreateFieldByName(string name)
        {
            var sut = new UnversionedDbField(name);

            sut.Name.Should().Be(name);
        }
Пример #8
0
 public void ShouldBeDbField(UnversionedDbField sut)
 {
     sut.Should().BeAssignableTo <DbField>();
 }
 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 ShouldCreateFieldByName(string name)
 {
   var sut = new UnversionedDbField(name);
   sut.Name.Should().Be(name);
 }
 public void ShouldCreateFieldById(ID id)
 {
   var sut = new UnversionedDbField(id);
   sut.ID.Should().BeSameAs(id);
 }
 public void ShouldBeDbField(UnversionedDbField sut)
 {
   sut.Should().BeAssignableTo<DbField>();
 }