ESAPI-C 1.0
The OWASP Enterprise Security API for C
|
00001 #include <stdio.h> 00002 #include <stdlib.h> 00003 #include "minunit.h" 00004 #include "esapi.h" 00005 00006 int tests_run = 0; 00007 00008 void test_load_security_context(void) { 00009 (void)fprintf(stdout,"Testing %s\n", __func__); 00010 00011 struct esapi_ctx *ctx = load_security_context("../configuration/ESAPI.properties"); 00012 TEST(ctx != 0); 00013 TEST(ctx->max_file_size == 100000); 00014 TEST(ctx->allowed_login_attempts == 3); 00015 TEST(ctx->quota_len == 0); 00016 TEST(ctx->idle_timeout == 30); 00017 TEST(ctx->absolute_timeout == 240); 00018 00019 } 00020 00021 int main(void) { 00022 test_load_security_context(); 00023 (void)fprintf(stdout, "%s: Pass <%i>, Fail<%i>\n", __FILE__, passed, failed); 00024 return(EXIT_SUCCESS); 00025 }