示例#1
0
        public static TUser MakeSavingLogin <TUser>(this ITestFixture fixture, Action <TUser> customizations = null) where TUser : class, IUser
        {
            MiruTest.Log.Debug(() => $"Making {typeof(TUser).FullName}");

            var user = fixture.Make(customizations);

            MiruTest.Log.Debug(() => $"Made:{Environment.NewLine}{user.Inspect()}");

            return(fixture.MakeSavingLogin(user));
        }
示例#2
0
        public async Task Build(ITestFixture _)
        {
            User = _.MakeSavingLogin <User>();

            Work     = _.Make <Area>();
            WorkLess = _.Make <Goal>(m => m.Area = Work);

            Health     = _.Make <Area>();
            DrinkWater = _.Make <Goal>(m => m.Area = Health);
            GoalEdit   = _.Make <Goal>(m => m.Area = Health);
            GoalRemove = _.Make <Goal>(m => m.Area = Health);

            AreaToRemove     = _.Make <Area>();
            GoalAreaToRemove = _.Make <Goal>(m => m.Area = AreaToRemove);

            AreaToEdit = _.Make <Area>();

            await _.Save(
                Work, WorkLess,
                Health, DrinkWater, GoalEdit, GoalRemove,
                AreaToRemove, GoalAreaToRemove,
                AreaToEdit);
        }