// Path: harahachibu/src/main/java/uk/co/flax/harahachibu/services/data/DiskSpace.java
// public class DiskSpace {
// 
// 	private final long freeSpace;
// 	private final long maxSpace;
// 	private final Date creationDate = new Date();
// 
// 	public DiskSpace(long freeSpace, long maxSpace) {
// 		this.freeSpace = freeSpace;
// 		this.maxSpace = maxSpace;
// 	}
// 
// 	public long getFreeSpace() {
// 		return freeSpace;
// 	}
// 
// 	public long getMaxSpace() {
// 		return maxSpace;
// 	}
// 
// 	public Date getCreationDate() {
// 		return creationDate;
// 	}
// 
// }


import org.junit.Test;
import uk.co.flax.harahachibu.services.data.DiskSpace;
import java.util.Collections;
import java.util.HashSet;
import java.util.Set;
import static org.assertj.core.api.Assertions.assertThat;
/**
 * Copyright (c) 2016 Lemur Consulting Ltd.
 * <p/>
 * 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
 * <p/>
 * http://www.apache.org/licenses/LICENSE-2.0
 * <p/>
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package uk.co.flax.harahachibu.services;




/**
 * Unit tests for the ClusterDiskSpaceManager.
 * Created by mlp on 18/04/16.
 */
public class ClusterDiskSpaceManagerTest {

	private static final String TEST_SERVER = "test.localhost";

	private final Set<String> servers = new HashSet<>(Collections.singleton(TEST_SERVER));
	private final ClusterDiskSpaceManager manager = new ClusterDiskSpaceManager(servers);

	@Test(expected = uk.co.flax.harahachibu.services.DiskSpaceCheckerException.class)
	public void throwsExceptionWhenServerNotKnown() throws Exception {
// Path: harahachibu/src/main/java/uk/co/flax/harahachibu/services/data/DiskSpace.java
// public class DiskSpace {
// 
// 	private final long freeSpace;
// 	private final long maxSpace;
// 	private final Date creationDate = new Date();
// 
// 	public DiskSpace(long freeSpace, long maxSpace) {
// 		this.freeSpace = freeSpace;
// 		this.maxSpace = maxSpace;
// 	}
// 
// 	public long getFreeSpace() {
// 		return freeSpace;
// 	}
// 
// 	public long getMaxSpace() {
// 		return maxSpace;
// 	}
// 
// 	public Date getCreationDate() {
// 		return creationDate;
// 	}
// 
// }


// Path: harahachibu/src/test/java/uk/co/flax/harahachibu/services/ClusterDiskSpaceManagerTest.java
import org.junit.Test;
import uk.co.flax.harahachibu.services.data.DiskSpace;
import java.util.Collections;
import java.util.HashSet;
import java.util.Set;
import static org.assertj.core.api.Assertions.assertThat;

/**
 * Copyright (c) 2016 Lemur Consulting Ltd.
 * <p/>
 * 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
 * <p/>
 * http://www.apache.org/licenses/LICENSE-2.0
 * <p/>
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package uk.co.flax.harahachibu.services;




/**
 * Unit tests for the ClusterDiskSpaceManager.
 * Created by mlp on 18/04/16.
 */
public class ClusterDiskSpaceManagerTest {

	private static final String TEST_SERVER = "test.localhost";

	private final Set<String> servers = new HashSet<>(Collections.singleton(TEST_SERVER));
	private final ClusterDiskSpaceManager manager = new ClusterDiskSpaceManager(servers);

	@Test(expected = uk.co.flax.harahachibu.services.DiskSpaceCheckerException.class)
	public void throwsExceptionWhenServerNotKnown() throws Exception {
		manager.setDiskSpace("blah", new DiskSpace(0, 0));