Exemplo n.º 1
0
        public void Set_ReducedWithNullParameterBuilder_ThrowsException()
        {
            // Arrange
            var builder = new BookCiteBuilder();

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

            // Act && Assert
            Assert.Throws <ArgumentNullException>(() => builder.Set <BookCiteBuilder, string>(null, () => "TEST"));
        }
Exemplo n.º 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"));
        }
Exemplo n.º 4
0
        public void Set_WrongParameter_ThrowsException()
        {
            // Arrange
            var builder = new BookCiteBuilder();

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