Skip to content

Instantly share code, notes, and snippets.

View premanandc's full-sized avatar

Premanand Chandrasekaran premanandc

View GitHub Profile
@premanandc
premanandc / functional requirements
Last active April 18, 2025 20:34
My conversations with Cursor
Me: Okay. Let's move on to create the notion of a Plan. This is the idea of wanting to apply an update over the population of devices. First, we need to know which devices are affected for a given update. A device is affected if:
1. A software package needs to be installed on it if it wasn't previously or a package is marked as forced.
2. A software package needs to be upgraded (it has a lower version of the software than the one specified in the update)
3. A software package needs to be uninstalled (if it is installed on the device)
Once the candidate list of devices is identified, the devices need to be split into smaller batches. Batches are of two types: test and mass. A test batch usually contains a smaller number of devices than mass batches. The purpose of a test batch is to assess how an update would perform, before it is applied on a larger number of devices. In that sense, each batch is a step in a plan. For each batch, the admin user will eventually specify a set of success criteria that needs to
@premanandc
premanandc / TraceWebAsyncClientAutoConfigurationTest.java
Last active July 16, 2016 03:29
Test to reproduce AsyncClientHttpRequestFactory and ClientHttpRequestFactory injection problem
/*
* Copyright 2013-2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
package com.premonition.todo.app.domain.task.handlers;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.datatype.jdk8.Jdk8Module;
import org.junit.Before;
import org.junit.Test;
import java.util.Optional;
import static com.fasterxml.jackson.annotation.JsonInclude.Include.NON_NULL;
@premanandc
premanandc / AbstractComponentContractTest.java
Last active December 19, 2015 20:59
Abstract contract test example
package com.alpha.api.contract;
import com.google.gson.JsonArray;
import com.google.gson.JsonElement;
import org.junit.Before;
import org.junit.Test;
import static org.hamcrest.Matchers.greaterThan;
import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.not;