Exemple #1
0
        public void Set_ReducedWithNullParameterBuilder_ThrowsException()
        {
            // Arrange
            var builder = new BookCiteBuilder();

            // Act && Assert
            Assert.Throws <ArgumentNullException>(() => builder.Set <BookCiteBuilder>(x => x.Title, null));
        }
Exemple #2
0
        public void Set_NullSelector_ThrowsException()
        {
            // Arrange
            var builder = new BookCiteBuilder();

            // Act && Assert
            Assert.Throws <ArgumentNullException>(() => builder.Set <BookCiteBuilder, string>(null, () => "TEST"));
        }
Exemple #3
0
        public void Set_ReducedWithNullSelector_ThrowsException()
        {
            // Arrange
            var builder = new BookCiteBuilder();

            // Act && Assert
            Assert.Throws <ArgumentNullException>(() => builder.Set <BookCiteBuilder>((Expression <Func <BookCite, object> >)null, () => "TEST"));
        }
Exemple #4
0
        public void Set_WrongParameter_ThrowsException()
        {
            // Arrange
            var builder = new BookCiteBuilder();

            // Act && Assert
            Assert.Throws <MissingFieldException>(() => builder.Set <BookCiteBuilder>("Price", () => "29.99€"));
        }