示例#1
0
            public void Should_Add_SetSingleErrorCommand_When_SetSingleError()
            {
                var builder = new MemberSpecificationBuilder <object, object>();

                builder.SetSingleError("message");

                Assert.Single(builder.Commands);
                Assert.IsType <SetSingleErrorCommand>(builder.Commands.Single());

                var command = (SetSingleErrorCommand)builder.Commands.Single();

                Assert.Equal("message", command.Message);
                Assert.Equal("SetSingleError", command.Name);
            }
示例#2
0
            public void Should_ThrowException_When_SetSingleError_With_NullMessage()
            {
                var builder = new MemberSpecificationBuilder <object, object>();

                Assert.Throws <ArgumentNullException>(() => { builder.SetSingleError(null); });
            }