public void ExtracPropertiesValues_ExtractSensitiveAndCrypticWithInheritenceAndException_ShouldBeEquivilent() { var cache = new PropertiesMetadataPropertiesCache(_logMocked); var mock = new TeacherWithExceptionMock(); var arguments = cache.ParseIntoParams(mock); arguments.Count().ShouldBe(mock.GetType().GetProperties().Length - 1); ArgumentVerivications(mock, arguments); _logMocked.Received().Warn(Arg.Any <string>(), Arg.Any <object>(), Arg.Any <object>(), Arg.Any <Exception>(), Arg.Any <bool>(), Arg.Any <string>(), Arg.Any <int>(), Arg.Any <string>()); }
public void ExtracPropertiesValues_SendTwoPeople_ShouldBeEquivilent() { var cache = new PropertiesMetadataPropertiesCache(_logMocked); var person = new PersonMockData(); var teacher = new TeacherWithExceptionMock(); var teacherArguments = cache.ParseIntoParams(teacher); var personArguments = cache.ParseIntoParams(person); personArguments.Count().ShouldBe(person.GetType().GetProperties().Length); ArgumentVerivications(person, personArguments); _logMocked.DidNotReceive().Warn(Arg.Any <string>(), Arg.Any <object>(), Arg.Any <object>(), Arg.Any <Exception>(), Arg.Any <bool>(), Arg.Any <string>(), Arg.Any <int>(), Arg.Any <string>()); teacherArguments.Count().ShouldBe(teacher.GetType().GetProperties().Length - 1); ArgumentVerivications(teacher, teacherArguments); _logMocked.Received().Warn(Arg.Any <string>(), Arg.Any <object>(), Arg.Any <object>(), Arg.Any <Exception>(), Arg.Any <bool>(), Arg.Any <string>(), Arg.Any <int>(), Arg.Any <string>()); }